[TIL] Algorithms Day 1 - Math
Problem 1. Sugar Delivery
N = int(input())
max = N // 5
bag = 0
flag = 0
for i in range(0, max):
bag = (N // 5) - i # if using / instead of //, the result is float type
rest = N - (bag * 5)
if rest % 3 == 0:
bag += rest // 3
flag = 1
...
siwonlog.hashnode.dev3 min read