ログインしてください。
A - Nigiri
Editorial
/
/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
o と . のみからなる文字列 S が与えられます。
S に含まれる o の個数が奇数ならば odd、偶数ならば even と出力してください。
制約
- S は
oと.からなる長さ 1 以上 10 以下の文字列
入力
入力は以下の形式で標準入力から与えられる。
S
出力
答えを出力せよ。
入力例 1
oo.o.o
出力例 1
even
S は o を 4 個含みます。4 は偶数であるため even と出力します。
入力例 2
..o.....
出力例 2
odd
S は o を 1 個含みます。1 は奇数であるため odd と出力します。
入力例 3
.
出力例 3
even
S は o を 0 個含みます。0 は偶数であるため even と出力します。
Score : 100 points
Problem Statement
You are given a string S consisting of o and ..
If the number of os in S is odd, print odd; if it is even, print even.
Constraints
- S is a string of length between 1 and 10, inclusive, consisting of
oand..
Input
The input is given from Standard Input in the following format:
S
Output
Print the answer.
Sample Input 1
oo.o.o
Sample Output 1
even
S contains 4 os. Since 4 is even, print even.
Sample Input 2
..o.....
Sample Output 2
odd
S contains 1 o. Since 1 is odd, print odd.
Sample Input 3
.
Sample Output 3
even
S contains 0 os. Since 0 is even, print even.