Odd Even Characters

View as PDF

Submit solution


Points: 100
Time limit: 1.0s
Memory limit: 256M

Authors:
Problem type

Problem Statement

You are given a string s of length n which consists of characters from the English alphabet (all in lower case).

A character is odd if it is from the sequence of characters that appear at an odd index in the English alphabet, and even if it appears at an even index.

For example:

  • Odd Characters: a, c, e, g, i ...
  • Even Character: b, d, f, h, j, ...

Given s, output the number of odd characters and the number of even characters.

Input

The first line contains an integer n: the length of s.

Your next line will contain s: a string containing n English lower-case letters.

Output

A single line, containing two space-separated integers, representing the number of odd characters in s, and the number of even characters in s, respectively.

Constraints

For all test cases...

  • 1 \le n \le 10^5
  • s only contains English lower-case letters.

Example 1

Input
5
abcde
Output
3 2
Explanation

The following odd characters are present: a, b, c. The other two are even.

Example 2

Input
9
quadratic
Output
6 3

Python Template

n = int(input())
s = input()
# Continue your code here and print your final answer!

Solution

If you'd like to view a sample solution to this tutorial question, please click the "Read Editorial" link to the right of the problem!


Comments

There are no comments at the moment.