시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 169 40 32 35.556%

문제

상근이는 종이에 숫자를 쓰려고 한다. 종이에는 1~5 사이의 숫자를 1개만 쓸 수 있고, 상근이는 종이를 무한개 가지고 있다.

열심히 종이를 쓴 다음에, 종이에 쓴 수의 평균을 P와 같게 만드려고 한다.

이때, 사용한 종이의 개수를 최소로 하려고 한다. P가 주어졌을 때, 각 숫자를 총 몇 번 쓰는지 출력하는 프로그램을 작성하시오.

입력

첫째 줄에 P가 주어진다. P는 1보다 크거나 같고, 5보다 작거나 같으며 소수점 1자리 ~ 9자리이다.

출력

첫째 줄에 5개의 음이 아닌 정수를 출력한다. 첫 번째 숫자는 1의 개수, 두 번째 숫자는 2의 개수, ..., 마지막 숫자는 5의 개수이다. 가능한 방법이 여러개라면 아무거나 출력한다.

예제 입력 1

5.0

예제 출력 1

0 0 0 0 1
W3sicHJvYmxlbV9pZCI6IjI4NjAiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM4ODVcdWM3NzRcdWM1ZDAgXHVjMjJiXHVjNzkwIFx1YzRmMFx1YWUzMCIsImRlc2NyaXB0aW9uIjoiPHA+XHVjMGMxXHVhZGZjXHVjNzc0XHViMjk0IFx1Yzg4NVx1Yzc3NFx1YzVkMCBcdWMyMmJcdWM3OTBcdWI5N2MgXHVjNGYwXHViODI0XHVhY2UwIFx1ZDU1Y1x1YjJlNC4gXHVjODg1XHVjNzc0XHVjNWQwXHViMjk0IDF+NSBcdWMwYWNcdWM3NzRcdWM3NTggXHVjMjJiXHVjNzkwXHViOTdjIDFcdWFjMWNcdWI5Y2MgXHVjNGY4IFx1YzIxOCBcdWM3ODhcdWFjZTAsIFx1YzBjMVx1YWRmY1x1Yzc3NFx1YjI5NCBcdWM4ODVcdWM3NzRcdWI5N2MgXHViYjM0XHVkNTVjXHVhYzFjIFx1YWMwMFx1YzljMFx1YWNlMCBcdWM3ODhcdWIyZTQuPFwvcD5cclxuXHJ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udGl0eSBvZiBlYWNoIHR5cGUgb2YgcGFwZXIuJm5ic3A7PFwvcD5cclxuXHJcbjxwPk1pcmtvJnJzcXVvO3MgdGFzayBpcyB0byBwaWNrIHRoZSBtaW5pbXVtIG51bWJlciBvZiBwYXBlcnMgaW4gYSB3YXkgdGhhdCB0aGUgYXZlcmFnZSBvZiB0aGUgbnVtYmVycyB3cml0dGVuIG9uIHRoZW0gZXF1YWxzIGV4YWN0bHkgUC4mbmJzcDs8XC9wPlxyXG4iLCJpbnB1dCI6IjxwPkZpcnN0IGFuZCBvbmx5IGxpbmUgb2YgaW5wdXQgY29udGFpbnMgcmVhbCBudW1iZXIgUC4mbmJzcDs8XC9wPlxyXG5cclxuPHA+UCB3aWxsIGhhdmUgYmV0d2VlbiAxIGFuZCA5IGRlY2ltYWwgcGxhY2VzLCBpbmNsdXNpdmUgKDEgJmxlOyBQICZsZTsgNSkuJm5ic3A7PFwvcD5cclxuIiwib3V0cHV0IjoiPHA+Rmlyc3QgYW5kIG9ubHkgbGluZSBvZiBvdXRwdXQgc2hvdWxkIGNvbnRhaW4gZml2ZSBub25uZWdhdGl2ZSBpbnRlZ2VycyAtIG51bWJlcnMgb2Ygb25lcywgdHdvcywgdGhyZWVzLCBmb3VycyBhbmQgZml2ZXMgdXNlZCwgcmVzcGVjdGl2ZWx5LiBJZiB0aGVyZSBhcmUgbXVsdGlwbGUgc29sdXRpb25zLCBvdXRwdXQgYW55IG9uZSBvZiB0aGVtLjxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Contest > Croatian Open Competition in Informatics > COCI 2010/2011 > Contest #4 4번

  • 문제를 번역한 사람: baekjoon
  • 잘못된 번역을 찾은 사람: kks227