PROSJEK
시간 제한: 1000ms메모리 제한: 128MB출처: COCI 2010-2011BOJ 2860
문제
Slavko decided to challenge Mirko! He gave him a real number P and a bag full of pieces of paper with exactly one number 1-5 written on each paper. There is an unlimited quantity of each type of paper.
Mirko’s task is to pick the minimum number of papers in a way that the average of the numbers written on them equals exactly P.
입력
First and only line of input contains real number P.
P will have between 1 and 9 decimal places, inclusive (1 ≤ P ≤ 5).
출력
First and only line of output should contain five nonnegative integers - numbers of ones, twos, threes, fours and fives used, respectively. If there are multiple solutions, output any one of them.
예제
예제 1
입력
5.0
출력
0 0 0 0 1
예제 2
입력
4.5
출력
0 0 0 1 1
예제 3
입력
3.20
출력
0 0 4 1 0
코드를 제출하려면 로그인하세요.