214102026-01-13 07:41:32Alma123456789Bányász RPG (40 pont)python3Wrong answer 0/40400ms16816 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/016ms3304 KiB
2Wrong answer0/082ms5424 KiB
3Wrong answer0/216ms3120 KiB
4Wrong answer0/218ms3112 KiB
5Wrong answer0/286ms5256 KiB
6Wrong answer0/2180ms6584 KiB
7Wrong answer0/235ms3688 KiB
8Wrong answer0/245ms3892 KiB
9Wrong answer0/316ms3124 KiB
10Wrong answer0/317ms3124 KiB
11Wrong answer0/316ms3124 KiB
12Wrong answer0/317ms3124 KiB
13Wrong answer0/419ms3160 KiB
14Wrong answer0/417ms3196 KiB
15Time limit exceeded0/2323ms10088 KiB
16Time limit exceeded0/2379ms13500 KiB
17Time limit exceeded0/2324ms10540 KiB
18Time limit exceeded0/2400ms16816 KiB