QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#623089#5732. Even or OddtorresosoAC ✓16ms10720kbPython3263b2024-10-09 10:05:542024-10-09 10:05:56

Judging History

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

  • [2024-10-09 10:05:56]
  • 评测
  • 测评结果:AC
  • 用时:16ms
  • 内存:10720kb
  • [2024-10-09 10:05:54]
  • 提交

answer


n = int(input())
sum1 = 0
for i in range(1, 1+n):
    sum1 += i

sum2 = 0
for i in range(2, 2+n):
    sum2 += i

if sum1 % 2 == 0 and sum2 % 2 == 0:
    print("Even")
elif sum1 % 2 != 0 and sum2 % 2 != 0:
    print("Odd")
else:
    print("Either")

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 15ms
memory: 10720kb

input:

1

output:

Either

result:

ok single line: 'Either'

Test #2:

score: 0
Accepted
time: 16ms
memory: 10604kb

input:

2

output:

Odd

result:

ok single line: 'Odd'

Test #3:

score: 0
Accepted
time: 15ms
memory: 10708kb

input:

3

output:

Either

result:

ok single line: 'Either'

Test #4:

score: 0
Accepted
time: 16ms
memory: 10608kb

input:

4

output:

Even

result:

ok single line: 'Even'

Test #5:

score: 0
Accepted
time: 8ms
memory: 10712kb

input:

5

output:

Either

result:

ok single line: 'Either'

Test #6:

score: 0
Accepted
time: 13ms
memory: 10620kb

input:

6

output:

Odd

result:

ok single line: 'Odd'

Test #7:

score: 0
Accepted
time: 16ms
memory: 10704kb

input:

7

output:

Either

result:

ok single line: 'Either'

Test #8:

score: 0
Accepted
time: 10ms
memory: 10624kb

input:

8

output:

Even

result:

ok single line: 'Even'

Test #9:

score: 0
Accepted
time: 16ms
memory: 10700kb

input:

9

output:

Either

result:

ok single line: 'Either'

Test #10:

score: 0
Accepted
time: 16ms
memory: 10696kb

input:

10

output:

Odd

result:

ok single line: 'Odd'