QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#846977 | #5732. Even or Odd | Yarema# | AC ✓ | 0ms | 3716kb | C++20 | 669b | 2025-01-07 16:38:24 | 2025-01-07 16:38:26 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef double db;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
if (n % 4 == 2)
cout << "Odd\n";
else if (n % 4 == 0)
cout << "Even\n";
else
cout << "Either\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3684kb
input:
1
output:
Either
result:
ok single line: 'Either'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
2
output:
Odd
result:
ok single line: 'Odd'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
3
output:
Either
result:
ok single line: 'Either'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
4
output:
Even
result:
ok single line: 'Even'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
5
output:
Either
result:
ok single line: 'Either'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
6
output:
Odd
result:
ok single line: 'Odd'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
7
output:
Either
result:
ok single line: 'Either'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
8
output:
Even
result:
ok single line: 'Even'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
9
output:
Either
result:
ok single line: 'Either'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
10
output:
Odd
result:
ok single line: 'Odd'