QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#623498 | #5732. Even or Odd | maxy1991991 | AC ✓ | 0ms | 3640kb | C++17 | 350b | 2024-10-09 12:25:09 | 2024-10-09 12:25:11 |
Judging History
answer
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
int main()
{
int n;
std::cin >> n;
if (n%2==1) {
std::cout << "Either";
}
else if (n%2==0) {
if ((n/2)%2==1) {
std::cout << "Odd";
}
else {
std::cout << "Even";
}
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
input:
1
output:
Either
result:
ok single line: 'Either'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
2
output:
Odd
result:
ok single line: 'Odd'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
3
output:
Either
result:
ok single line: 'Either'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
4
output:
Even
result:
ok single line: 'Even'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
5
output:
Either
result:
ok single line: 'Either'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
6
output:
Odd
result:
ok single line: 'Odd'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
7
output:
Either
result:
ok single line: 'Either'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
8
output:
Even
result:
ok single line: 'Even'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
9
output:
Either
result:
ok single line: 'Either'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
10
output:
Odd
result:
ok single line: 'Odd'