QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#623113#5732. Even or OddyaffenatorWA 15ms10712kbPython3493b2024-10-09 10:14:012024-10-09 10:14:04

Judging History

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

  • [2024-10-09 10:14:04]
  • 评测
  • 测评结果:WA
  • 用时:15ms
  • 内存:10712kb
  • [2024-10-09 10:14:01]
  • 提交

answer

import sys
input = sys.stdin.readline

def inp(): # For taking integer inputs.
    return(int(input()))

def main():
    n = inp()

    sum1 = 0
    sum2 = 0

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

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

    if sum1 % 2 == 0 and sum2 % 2 == 0:
        even_or_odd = "Even"
    if sum1 % 2 != 0 and sum2 % 2 != 0:
        even_or_odd = "Odd"
    else:
        even_or_odd = "Either"

    print(even_or_odd)

main()

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 13ms
memory: 10608kb

input:

1

output:

Either

result:

ok single line: 'Either'

Test #2:

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

input:

2

output:

Odd

result:

ok single line: 'Odd'

Test #3:

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

input:

3

output:

Either

result:

ok single line: 'Either'

Test #4:

score: -100
Wrong Answer
time: 15ms
memory: 10704kb

input:

4

output:

Either

result:

wrong answer 1st lines differ - expected: 'Even', found: 'Either'