pastebin

Paste Search Dynamic
Recent pastes
cnt
  1. import math
  2. x = int(input())
  3. arr = [2000,700,500,200,150,100,50,20,10,5,2,1]
  4. res = 0
  5. cnt = 0
  6. for i in arr:
  7.         if i <= x:
  8.                 res = math.floor(x/i)
  9.                 cnt+=1
  10.                 x -= i
  11.                 print(i,res)
  12. print(cnt)
Parsed in 0.002 seconds