Problem Statement
You are given a string of length 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 , output the number of odd characters and the number of even characters.
Input
The first line contains an integer : the length of .
Your next line will contain : a string containing English lower-case letters.
Output
A single line, containing two space-separated integers, representing the number of odd characters in , and the number of even characters in , respectively.
Constraints
For all test cases...
- 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