CF1110A.Parity
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given an integer n ( n≥0 ) represented with k digits in base (radix) b . So,
n=a1⋅bk−1+a2⋅bk−2+…ak−1⋅b+ak.
For example, if b=17,k=3 and a=\[11, 15, 7\] then n=11cdot172+15cdot17+7=3179+255+7=3441
Determine whether n is even or odd.
输入格式
The first line contains two integers b and k ( 2≤b≤100 , 1≤k≤105 ) — the base of the number and the number of digits.
The second line contains k integers a1,a2,…,ak ( 0≤ai<b ) — the digits of n .
The representation of n contains no unnecessary leading zero. That is, a1 can be equal to 0 only if k=1 .
输出格式
Print "even" if n is even, otherwise print "odd".
You can print each letter in any case (upper or lower).
输入输出样例
输入#1
13 3 3 2 7
输出#1
even
输入#2
10 9 1 2 3 4 5 6 7 8 9
输出#2
odd
输入#3
99 5 32 92 85 74 4
输出#3
odd
输入#4
2 2 1 0
输出#4
even
说明/提示
In the first example, n=3⋅132+2⋅13+7=540 , which is even.
In the second example, n=123456789 is odd.
In the third example, n=32⋅994+92⋅993+85⋅992+74⋅99+4=3164015155 is odd.
In the fourth example n=2 .