HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Economics & Finance > problem:


50958 - ATM

Guest
• Review clarifications (1)

Section problems

• 51040 - Annual profit
• 51038 - Simple interest
• 51039 - Automated billing system
• 50958 - ATM
• 50482 - Bank Charges
• 50491 - Brokers
• 50806 - TVSH
• 50514 - Bookkeeping
• 50523 - Total Tax to Pay
• 50534 - Top Trading Company
• 50405 - Accounts Receivable

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 4000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb.
Olympiad 2013. Prepared by: Evis Hoxha.

Question 4- ATM

Shqip

Write a program ATM that returns the money requested by the user. The ATM has notes of three kinds: 1000, 500 dhe 100.

Input
There will be given two numbers a n and m, where n is the value that the user has in its account and m is the value that wants to take.

Output
If the sum that the user wants to take is less than the value of money in its accoun, show Not enough money. If the required value can not be converted in the notes of the ATM, show Not possible.

If the required value can be converted in the notes of the ATM, show three numbers: a, b, c, which are the number of notes with value 1000, notes with value 500, notes with values 100 respectively.

Input I

7000 5400

Output I

5 0 4


Input II
7000 8100
Output II
Not enough money

Input III
7000 541
Output III
Not possible

Для отправки решений необходимо выполнить вход.

www.contester.ru