[Community Puzzle] Bank Robbers

Thanks for your answer, I’ll check with that in mind

Hey guys,
Im getting the first two test case right but im not getting where im going wrong with the last two:

r = int(input())

v = int(input())

work_divided = int(v/r)

total = 0

vault_times = [0] * work_divided

for i in range(v):

    c, n = [int(j) for j in input().split()]

    time_taken = (10**n)*(5**(c-n))

   

    for i in range(0,len(vault_times)):

        if time_taken > vault_times[i]:

            vault_times[i] = time_taken

total = sum(vault_times)

print(total)

Your code is not formatted properly, so it is difficult to check. Anyway, I think you may consider whether your code has taken into account the following from the puzzle statement:

Once he finishes one vault, he moves on to the next available vault.

Meaning: they do not divide their work evenly in terms of the number of vaults. Not sure if that was the assumption you made when you calculated the variable work_divided.

All the robbers work at the same time… You have to output the total time the heist takes.

Meaning: you do not have to sum up the times spent by individual robbers. You are requested to output how long the entire heist takes.

1 Like

Hello,

Isn’t the goal : “You have to output the total time the heist takes.” incorrect ? Wouldn’t it be “You have to output the maximum total time the heist might take.” because one can open a vault on average at number of permutations / 2 ?

Thanks

Not sure what you mean, but the robbers don’t split their work evenly, so I guess averages aren’t relevant.