214092026-01-13 07:40:39Alma123456789Bányász RPG (40 pont)pypy3Wrong answer 0/4075ms32000 KiB
n = int(input("Alapanyagok száma: "))
xp = 0
fastxp = list(map(int, input().split()))
req = list(map(int, input().split()))
current = [0]*n
time = 0

for i in range(100):
    if xp >= abs(min(fastxp)):
        farmed = fastxp.index(abs(min(fastxp)))
    else:
        if abs(max(req)) == 0.1:
            break
        else:
            farmed = req.index(abs(max(req)))

    if fastxp[farmed] <= xp:
        current[farmed] += 1
        time += 1
        xp += 1
    else:
        current[farmed] += 1
        time += 2
        xp += 1
    
    if current[farmed] >= req[farmed]:
        fastxp[farmed] = -9999999
        req[farmed] = -0.1
print(time)
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/039ms19432 KiB
2Wrong answer0/057ms22580 KiB
3Wrong answer0/250ms21456 KiB
4Wrong answer0/252ms21588 KiB
5Wrong answer0/256ms22152 KiB
6Wrong answer0/275ms25144 KiB
7Wrong answer0/250ms21468 KiB
8Wrong answer0/257ms21636 KiB
9Wrong answer0/346ms19664 KiB
10Wrong answer0/348ms21504 KiB
11Wrong answer0/346ms21504 KiB
12Wrong answer0/354ms21564 KiB
13Wrong answer0/457ms21624 KiB
14Wrong answer0/454ms21504 KiB
15Runtime error0/265ms32000 KiB
16Runtime error0/264ms32000 KiB
17Runtime error0/274ms32000 KiB
18Runtime error0/268ms32000 KiB