Demonetisation and the notes.

3.5

2 votes
Easy
Problem

On 8 November 2016, the Government of India announced the demonetisation of all ₹500 and ₹1,000 banknotes and introduced new 500 and 2000 notes.Help RBI update their software with the new 2000 notes.

ATM Machine contains only 2000, 500 and 100 rupee notes. Given a withdrawal amount, a software in ATM machine decides how many notes of each denomination should be dispensed to fulfill use request, such that total number of notes is minimum.

PROBLEM STATEMENT

Given an integer amount user enters for withdrawal, you are convert it into how many 2000, 500 and 100 rupees each would be needed to match users need(Minimum no.of notes).

Input Format Given N , the amount to be withdrawn.

Output Format number of 2000,500,100 notes each respectively separated by commas. no.of 2000 notes,no.of 500 notes,no.of 100 notes

if amount isn't a multiple of 100, print-> "please enter only multiples of 100".

Constraints 0<=Amount<=100000

Sample Input
600
Sample Output
0,1,1
Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

600 rupees can be given as a 500 rupees note and a 100 rupees note and zero 2000 notes. Therefore , output is 0,1,1

Editor Image

?