Submission #2837158


Source Code Expand

import numpy as np

N = int(input())
C_arr = np.zeros(N)
B_arr = np.zeros(N)
for i in range(N):
    A, B = map(int, input().split())
    C_arr[i], B_arr[i] = B-A%B, B
count = 0
for i in range(N-1, -1, -1):
    count += C_arr[i]
    C_arr[:i] = (C_arr[:i] - C_arr[i]) % B_arr[:i]
print(int(count))

Submission Info

Submission Time
Task A - Multiple Array
User Ikok
Language Python (3.4.3)
Score 0
Code Size 310 Byte
Status WA
Exec Time 2108 ms
Memory 17320 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 2
WA × 2
TLE × 14
Set Name Test Cases
Sample s1.txt, s2.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, s1.txt, s2.txt
Case Name Status Exec Time Memory
01.txt TLE 2108 ms 15588 KB
02.txt TLE 2108 ms 15596 KB
03.txt TLE 2108 ms 15592 KB
04.txt TLE 2108 ms 15588 KB
05.txt TLE 2108 ms 15592 KB
06.txt TLE 2108 ms 15592 KB
07.txt TLE 2108 ms 15588 KB
08.txt TLE 2108 ms 15592 KB
09.txt TLE 2108 ms 15584 KB
10.txt TLE 2108 ms 15588 KB
11.txt TLE 2108 ms 17320 KB
12.txt TLE 2108 ms 15596 KB
13.txt TLE 2108 ms 15584 KB
14.txt TLE 2108 ms 15584 KB
15.txt WA 148 ms 12488 KB
16.txt WA 147 ms 12488 KB
s1.txt AC 148 ms 14536 KB
s2.txt AC 148 ms 12488 KB