QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#851206#5732. Even or OddWeaRD276#AC ✓1ms3688kbC++201.0kb2025-01-10 16:31:082025-01-10 16:31:10

Judging History

你现在查看的是最新测评结果

  • [2025-01-10 16:31:10]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3688kb
  • [2025-01-10 16:31:08]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define x first
#define y second
#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--)

typedef long long ll;
typedef double db;
typedef long double LD;
typedef pair<int, int> pii;
typedef pair<db, db> pdd;
typedef pair<ll, ll> pll;


int solve()
{
	int n;
	if (!(cin >> n))
		return 1;
	
	if (n & 1)
		cout << "Either\n";
	else if (n % 4 == 0)
		cout << "Even\n";
	else
		cout << "Odd\n";
		
	return 0;
}

int32_t main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int TET = 1e9;
	//cin >> TET;
	for (int i = 1; i <= TET; i++)
	{
		if (solve())
		{
			break;
		}
		#ifdef ONPC
			cerr << "_____________________________\n";
		#endif
	}
	#ifdef ONPC
		cerr << "\nfinished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec\n";
	#endif
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3688kb

input:

1

output:

Either

result:

ok single line: 'Either'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

2

output:

Odd

result:

ok single line: 'Odd'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

3

output:

Either

result:

ok single line: 'Either'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3668kb

input:

4

output:

Even

result:

ok single line: 'Even'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

5

output:

Either

result:

ok single line: 'Either'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

6

output:

Odd

result:

ok single line: 'Odd'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

7

output:

Either

result:

ok single line: 'Either'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

8

output:

Even

result:

ok single line: 'Even'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

9

output:

Either

result:

ok single line: 'Either'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

10

output:

Odd

result:

ok single line: 'Odd'