Submission #3621064
Source Code Expand
# -*- coding: utf-8 -*- x,y = map(int, input().split()) if x==0: res = abs(y) if y<0: res += 1 print(res) exit() if y==0: res = abs(x) if x>0: res += 1 print(res) exit() if x*y<0: print(1+abs(abs(y)-abs(x))) elif x<y: print(y-x) else: print(2+x-y)
Submission Info
Submission Time | |
---|---|
Task | A - Simple Calculator |
User | mtakushi |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 332 Byte |
Status | AC |
Exec Time | 17 ms |
Memory | 3064 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 17 ms | 3060 KB |
0_01.txt | AC | 17 ms | 3060 KB |
0_02.txt | AC | 17 ms | 3060 KB |
1_00.txt | AC | 17 ms | 3060 KB |
1_01.txt | AC | 17 ms | 3060 KB |
1_02.txt | AC | 17 ms | 3060 KB |
1_03.txt | AC | 17 ms | 2940 KB |
1_04.txt | AC | 17 ms | 3064 KB |
1_05.txt | AC | 17 ms | 3060 KB |
1_06.txt | AC | 17 ms | 3060 KB |
1_07.txt | AC | 17 ms | 3060 KB |
1_08.txt | AC | 17 ms | 3060 KB |
1_09.txt | AC | 17 ms | 2940 KB |
1_10.txt | AC | 17 ms | 2940 KB |