QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#623113 | #5732. Even or Odd | yaffenator | WA | 15ms | 10712kb | Python3 | 493b | 2024-10-09 10:14:01 | 2024-10-09 10:14:04 |
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: 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'