QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#623108 | #5732. Even or Odd | yaffenator | WA | 7ms | 10704kb | Python3 | 493b | 2024-10-09 10:13:05 | 2024-10-09 10:13:06 |
Judging History
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'