Submission #3228307


Source Code Expand

N = int(input())
A = [0]*N
B = [0]*N
hoge = int(1e18)
for i in range(N):
    a, b = map(int, input().split())
    A[i] = a
    B[i] = b
    if a > b:
        hoge = min(hoge, b)

if hoge == int(1e18):
    print(0)
else:
    print(sum(B) - hoge)

Submission Info

Submission Time
Task E - Tozan and Gezan
User Gobi
Language Python (3.4.3)
Score 700
Code Size 260 Byte
Status AC
Exec Time 80 ms
Memory 4596 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 700 / 700
Status
AC × 3
AC × 35
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 30.txt, 31.txt, 32.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt AC 78 ms 4596 KB
02.txt AC 79 ms 4596 KB
03.txt AC 78 ms 4596 KB
04.txt AC 77 ms 4596 KB
05.txt AC 77 ms 4596 KB
06.txt AC 76 ms 4596 KB
07.txt AC 77 ms 4596 KB
08.txt AC 76 ms 4596 KB
09.txt AC 75 ms 4596 KB
10.txt AC 75 ms 4596 KB
11.txt AC 74 ms 4596 KB
12.txt AC 76 ms 4596 KB
13.txt AC 74 ms 4596 KB
14.txt AC 75 ms 4596 KB
15.txt AC 75 ms 4596 KB
16.txt AC 77 ms 4596 KB
17.txt AC 76 ms 4596 KB
18.txt AC 74 ms 4596 KB
19.txt AC 78 ms 4596 KB
20.txt AC 77 ms 4596 KB
21.txt AC 75 ms 4596 KB
22.txt AC 77 ms 4596 KB
23.txt AC 78 ms 4596 KB
24.txt AC 78 ms 4596 KB
25.txt AC 75 ms 4596 KB
26.txt AC 77 ms 4596 KB
27.txt AC 77 ms 4596 KB
28.txt AC 77 ms 4596 KB
29.txt AC 80 ms 4596 KB
30.txt AC 80 ms 4596 KB
31.txt AC 17 ms 2940 KB
32.txt AC 17 ms 2940 KB
s1.txt AC 17 ms 2940 KB
s2.txt AC 17 ms 2940 KB
s3.txt AC 17 ms 2940 KB