fork(1) download
  1. def wiele(kwota):
  2. nominaly = [20, 10, 5, 2, 1]
  3. ile = 0
  4. for x in nominaly:
  5. #print(x, kwota // x)
  6. ile = ile + kwota // x
  7. kwota = kwota % x
  8. return ile
  9.  
  10. print(wiele(11))
  11. print(wiele(99))
Success #stdin #stdout 0.11s 14148KB
stdin
Standard input is empty
stdout
2
8