HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Albanian National Olympiads in Informatics > problem:


2013-4. 50958 - ATM

Guest
• Review clarifications (1)

Volume problems

• 2015-2. 50489 - Football Championship
• 2010-1. 50298 - Coins
• 2010-2. 50299 - Median
• 2010-3. 50300 - Matrix
• 2012-2. 50545 - Diet
• 2013-1. 50591 - Leap year
• 2013-3. 50570 - Prime numbers in t...
• 2013-4. 50958 - ATM
• 2013-5. 50543 - Hotel rooms
• 2013-6. 50562 - List of students
• 2012-1. 50544 - Stock market
• 2012-4. 50680 - Triangle
• 2012-5. 50551 - Camelot
• 2014-2. 50738 - Median value
• 2012-3. 50721 - Palindrome

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