QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#623099#5732. Even or OddyaffenatorWA 9ms10616kbPython3533b2024-10-09 10:11:522024-10-09 10:11:56

Judging History

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

  • [2024-10-09 10:11:56]
  • 评测
  • 测评结果:WA
  • 用时:9ms
  • 内存:10616kb
  • [2024-10-09 10:11:52]
  • 提交

answer

import sys
input = sys.stdin.readline

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

def main():
    input = inp()
    
    sum1 = 0
    sum2 = 0
    
    for i in range(1, input + 1):
        sum1 += i
        
    for i in range(2, input + 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: 9ms
memory: 10616kb

input:

1

output:

either

result:

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