L M N s = 0 value = (100, 25, 1) money = 100*L + 25*M + N for i in range(3): if money > 0: s = money // value[i] money = money % value[i] print(s)