11041 | 2024-07-05 00:28:45 | proba | Bevásárlás | python3 | Accepted 100/100 | 18ms | 3128 KiB |
db = [0,0,0]
for i in range(3):
db[i] = int(input())
p = [300, 350, 400]
if sum(db) < 10:
print(-1)
else:
n, s, i = 0, 0, 0
while n < 10:
if db[i] > 0:
n += 1; s += p[i]
db[i] -= 1
else:
i += 1
print(s)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 2916 KiB | ||||
2 | Accepted | 17ms | 2916 KiB | ||||
3 | Accepted | 17ms | 2952 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 17ms | 2936 KiB | ||||
5 | Accepted | 17ms | 3044 KiB | ||||
6 | Accepted | 17ms | 3044 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 17ms | 3128 KiB | ||||
8 | Accepted | 17ms | 2920 KiB | ||||
9 | Accepted | 18ms | 2872 KiB | ||||
10 | Accepted | 17ms | 2916 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 17ms | 2936 KiB | ||||
12 | Accepted | 17ms | 2916 KiB | ||||
13 | Accepted | 17ms | 3096 KiB | ||||
14 | Accepted | 17ms | 2992 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 17ms | 3076 KiB | ||||
16 | Accepted | 17ms | 2980 KiB | ||||
17 | Accepted | 18ms | 2916 KiB | ||||
18 | Accepted | 17ms | 3068 KiB | ||||
19 | Accepted | 17ms | 2856 KiB | ||||
20 | Accepted | 17ms | 3064 KiB |