2742 | 2023-01-20 15:21:32 | kristof | Szemetessor | python3 | Wrong answer 0/100 | 569ms | 63940 KiB |
N, M = input().split()
N = int(N)
M = int(M)
avo = 0
lista = [0 for i in range(N)]
MaxErtekLista = list(map(int, input().split()))
for i in range(M):
index, value = input().split()
index = int(index)
value = int(value)
lista[index] += value
for i in range(N):
avo += MaxErtekLista[i] - lista[i] % MaxErtekLista[i]
print(avo)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 11224 KiB | ||||
2 | Accepted | 17ms | 11440 KiB | ||||
subtask2 | 0/17 | ||||||
3 | Wrong answer | 17ms | 11912 KiB | ||||
4 | Accepted | 17ms | 12308 KiB | ||||
5 | Accepted | 17ms | 12132 KiB | ||||
6 | Wrong answer | 16ms | 12292 KiB | ||||
7 | Accepted | 17ms | 12572 KiB | ||||
8 | Accepted | 17ms | 12352 KiB | ||||
9 | Wrong answer | 17ms | 12520 KiB | ||||
10 | Accepted | 17ms | 12556 KiB | ||||
11 | Wrong answer | 17ms | 12604 KiB | ||||
subtask3 | 0/25 | ||||||
12 | Wrong answer | 352ms | 13112 KiB | ||||
13 | Wrong answer | 363ms | 13176 KiB | ||||
14 | Wrong answer | 379ms | 13536 KiB | ||||
15 | Wrong answer | 377ms | 14096 KiB | ||||
16 | Wrong answer | 386ms | 15900 KiB | ||||
17 | Wrong answer | 453ms | 37352 KiB | ||||
18 | Accepted | 549ms | 61192 KiB | ||||
19 | Accepted | 551ms | 61316 KiB | ||||
20 | Accepted | 559ms | 61364 KiB | ||||
subtask4 | 0/20 | ||||||
21 | Wrong answer | 370ms | 16340 KiB | ||||
22 | Wrong answer | 400ms | 26204 KiB | ||||
23 | Wrong answer | 384ms | 16248 KiB | ||||
24 | Wrong answer | 398ms | 19692 KiB | ||||
25 | Wrong answer | 381ms | 16244 KiB | ||||
26 | Wrong answer | 465ms | 37584 KiB | ||||
27 | Wrong answer | 532ms | 59396 KiB | ||||
28 | Wrong answer | 551ms | 60324 KiB | ||||
29 | Wrong answer | 536ms | 60512 KiB | ||||
30 | Wrong answer | 541ms | 63940 KiB | ||||
subtask5 | 0/38 | ||||||
31 | Wrong answer | 17ms | 13920 KiB | ||||
32 | Wrong answer | 16ms | 13948 KiB | ||||
33 | Wrong answer | 17ms | 14228 KiB | ||||
34 | Wrong answer | 17ms | 14236 KiB | ||||
35 | Wrong answer | 41ms | 16528 KiB | ||||
36 | Wrong answer | 372ms | 14448 KiB | ||||
37 | Wrong answer | 541ms | 61896 KiB | ||||
38 | Wrong answer | 535ms | 62144 KiB | ||||
39 | Wrong answer | 550ms | 62044 KiB | ||||
40 | Wrong answer | 560ms | 61964 KiB | ||||
41 | Wrong answer | 547ms | 62136 KiB | ||||
42 | Wrong answer | 569ms | 61888 KiB |