Denominations - 4
Write a Python program of Denominations - 4. It consists of two test cases
The below link contains Denominations - 4 - Question, explanation and test cases
https://drive.google.com/file/d/1V_Mddi69HHGThW1V4Y04zgHkes46CIJF/view?usp=sharing
We need all test caese can be come while code was running
M = int(input())
print('2000:', M//2000, sep='', end=' ')
M -= M//2000 * 2000
print('500:', M//500, sep='', end=' ')
M -= M//500 * 500
print('200:', M//200, sep='', end=' ')
M -= M//200 * 200
print('50:', M//50, sep='', end=' ')
M -= M//50 * 50
print('20:', M//20, sep='', end=' ')
M -= M//20 * 20
print('5:', M//5, sep='', end=' ')
M -= M//5 * 5
print('2:', M//2, sep='', end=' ')
M -= M//2 * 2
print('1:', M, sep='')
Comments
Leave a comment