You are viewing a single comment's thread. Return to all comments →
for reference & any possible optimizations appriciated
arrChocolates = [] chocolates = 0 for _ in range(int(input())): dollars,price,chocltWrapr = map(int,input().split()) chocolates = dollars // price wrapper = chocolates while wrapper >= chocltWrapr: chocolates += 1 wrapper = wrapper - chocltWrapr wrapper += 1 arrChocolates.append(chocolates) for i in arrChocolates: print(i)
Seems like cookies are disabled on this browser, please enable them to open this website
Chocolate Feast
You are viewing a single comment's thread. Return to all comments →
for reference & any possible optimizations appriciated