Submission #928729
Source Code Expand
n=int(raw_input()) ta=[map(int,raw_input().split()) for _ in xrange(n)] for i in xrange(1,n): if ta[i-1][0]>ta[i][0]: ta[i][1]=ta[i][1]*((ta[i-1][0]-1)/ta[i][0]+1) ta[i][0]=ta[i][0]*((ta[i-1][0]-1)/ta[i][0]+1) if ta[i-1][1]>ta[i][1]: ta[i][0]=ta[i][0]*((ta[i-1][1]-1)/ta[i][1]+1) ta[i][1]=ta[i][1]*((ta[i-1][1]-1)/ta[i][1]+1) print(ta[n-1][0]+ta[n-1][1])
Submission Info
Submission Time | |
---|---|
Task | C - AtCoDeer and Election Report |
User | roto_37 |
Language | Python (2.7.6) |
Score | 0 |
Code Size | 403 Byte |
Status | WA |
Exec Time | 22 ms |
Memory | 2820 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 16 ms | 2696 KB |
0_001.txt | AC | 16 ms | 2696 KB |
0_002.txt | AC | 16 ms | 2696 KB |
1_003.txt | AC | 16 ms | 2696 KB |
1_004.txt | AC | 19 ms | 2696 KB |
1_005.txt | WA | 17 ms | 2696 KB |
1_006.txt | AC | 17 ms | 2696 KB |
1_007.txt | WA | 17 ms | 2696 KB |
1_008.txt | WA | 16 ms | 2696 KB |
1_009.txt | WA | 16 ms | 2696 KB |
1_010.txt | WA | 16 ms | 2696 KB |
1_011.txt | AC | 17 ms | 2696 KB |
1_012.txt | WA | 17 ms | 2696 KB |
1_013.txt | WA | 21 ms | 2820 KB |
1_014.txt | WA | 22 ms | 2820 KB |