QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#623099 | #5732. Even or Odd | yaffenator | WA | 9ms | 10616kb | Python3 | 533b | 2024-10-09 10:11:52 | 2024-10-09 10:11:56 |
Judging History
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'