11788 | 2024-11-10 18:48:52 | M | Bevásárlás | python3 | Accepted 100/100 | 17ms | 3124 KiB |
A = int(input(""))
B = int(input(""))
C = int(input(""))
if A + B + C < 10:
print(-1)
exit()
price = 0
for i in range(10):
if A != 0:
price += 300
A -= 1
elif B != 0:
price += 350
B -= 1
else:
price += (10-i)*400
break
print(price)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 2872 KiB | ||||
2 | Accepted | 16ms | 2880 KiB | ||||
3 | Accepted | 16ms | 2872 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 17ms | 2872 KiB | ||||
5 | Accepted | 16ms | 2876 KiB | ||||
6 | Accepted | 17ms | 3080 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 17ms | 3024 KiB | ||||
8 | Accepted | 16ms | 3052 KiB | ||||
9 | Accepted | 14ms | 3052 KiB | ||||
10 | Accepted | 16ms | 2864 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 16ms | 2872 KiB | ||||
12 | Accepted | 16ms | 3060 KiB | ||||
13 | Accepted | 16ms | 3124 KiB | ||||
14 | Accepted | 16ms | 2868 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 17ms | 2948 KiB | ||||
16 | Accepted | 16ms | 2888 KiB | ||||
17 | Accepted | 16ms | 2904 KiB | ||||
18 | Accepted | 14ms | 2884 KiB | ||||
19 | Accepted | 14ms | 2872 KiB | ||||
20 | Accepted | 14ms | 2932 KiB |