链接:https://ac.nowcoder.com/acm/contest/12606/D
来源:牛客网
Your friend has secretly picked N consecutive positive
integers between 1 and 100, and wants you to guess if their sum is
even or odd.
If the sum must be even, output 'EvenEven'. If the sum must be odd, output 'OddOdd'. If the sum could be even or could be odd,
output 'EitherEither'.
输入描述:
The input is a single integer N with 1≤N≤101≤N≤10.
输出描述:
Output a single word. The word should be 'EvenEven', 'OddOdd', or 'EitherEither', according to the rules given earlier.
示例1
输入
复制
1
输出
复制
Either
示例2
输入
复制
2
输出
复制
Odd
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
if(n%2==1)
cout<<"Either";
else
{
if((n/2)%2==0)
cout<<"Even";
else
cout<<"Odd";
}
return 0;
}