QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#623108#5732. Even or OddyaffenatorWA 7ms10704kbPython3493b2024-10-09 10:13:052024-10-09 10:13:06

Judging History

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

  • [2024-10-09 10:13:06]
  • 评测
  • 测评结果:WA
  • 用时:7ms
  • 内存:10704kb
  • [2024-10-09 10:13:05]
  • 提交

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: 0
Wrong Answer
time: 7ms
memory: 10704kb

input:

1

output:

either

result:

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