Task: | A + B |
Sender: | Ales Suchomel |
Submission time: | 2020-09-12 01:29:44 +0300 |
Language: | Python3 (CPython3) |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.02 s | details |
#2 | ACCEPTED | 0.02 s | details |
#3 | ACCEPTED | 0.02 s | details |
#4 | ACCEPTED | 0.02 s | details |
#5 | ACCEPTED | 0.02 s | details |
#6 | ACCEPTED | 0.02 s | details |
#7 | ACCEPTED | 0.02 s | details |
#8 | ACCEPTED | 0.02 s | details |
#9 | ACCEPTED | 0.02 s | details |
#10 | ACCEPTED | 0.02 s | details |
Code
import sys def a_plus_b(): line = sys.stdin.readline() input = line.split() if len(input) is not 2: sys.stderr.write("Wrong input format.") try: output = int(input[0]) + int(input[1]) sys.stdout.write(str(output)) except ValueError: sys.stderr.write("Wrong input format.") if __name__ == "__main__": a_plus_b()
Test details
Test 1
Verdict: ACCEPTED
input |
---|
3 5 |
correct output |
---|
8 |
user output |
---|
8 |
Test 2
Verdict: ACCEPTED
input |
---|
-6 4 |
correct output |
---|
-2 |
user output |
---|
-2 |
Test 3
Verdict: ACCEPTED
input |
---|
-882818 -697825 |
correct output |
---|
-1580643 |
user output |
---|
-1580643 |
Test 4
Verdict: ACCEPTED
input |
---|
-357110 -868193 |
correct output |
---|
-1225303 |
user output |
---|
-1225303 |
Test 5
Verdict: ACCEPTED
input |
---|
577866 -227464 |
correct output |
---|
350402 |
user output |
---|
350402 |
Test 6
Verdict: ACCEPTED
input |
---|
571335 750047 |
correct output |
---|
1321382 |
user output |
---|
1321382 |
Test 7
Verdict: ACCEPTED
input |
---|
744471 719178 |
correct output |
---|
1463649 |
user output |
---|
1463649 |
Test 8
Verdict: ACCEPTED
input |
---|
629697 -138795 |
correct output |
---|
490902 |
user output |
---|
490902 |
Test 9
Verdict: ACCEPTED
input |
---|
308833 436123 |
correct output |
---|
744956 |
user output |
---|
744956 |
Test 10
Verdict: ACCEPTED
input |
---|
-486131 -888278 |
correct output |
---|
-1374409 |
user output |
---|
-1374409 |