시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 213 85 39 33.333%

문제

상근이는 종이에 숫자를 쓰려고 한다. 종이에는 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+NSBcdWMwYWNcdWM3NzRcdWM3NTggXHVjMjJiXHVjNzkwXHViOTdjIDFcdWFjMWNcdWI5Y2MgXHVjNGY4IFx1YzIxOCBcdWM3ODhcdWFjZTAsIFx1YzBjMVx1YWRmY1x1Yzc3NFx1YjI5NCBcdWM4ODVcdWM3NzRcdWI5N2MgXHViYjM0XHVkNTVjXHVhYzFjIFx1YWMwMFx1YzljMFx1YWNlMCBcdWM3ODhcdWIyZTQuPFwvcD5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biBlYWNoIHBhcGVyLiBUaGVyZSBpcyBhbiB1bmxpbWl0ZWQgcXVhbnRpdHkgb2YgZWFjaCB0eXBlIG9mIHBhcGVyLiZuYnNwOzxcL3A+XHJcblxyXG48cD5NaXJrbyZyc3F1bztzIHRhc2sgaXMgdG8gcGljayB0aGUgbWluaW11bSBudW1iZXIgb2YgcGFwZXJzIGluIGEgd2F5IHRoYXQgdGhlIGF2ZXJhZ2Ugb2YgdGhlIG51bWJlcnMgd3JpdHRlbiBvbiB0aGVtIGVxdWFscyBleGFjdGx5IFAuJm5ic3A7PFwvcD5cclxuIiwiaW5wdXQiOiI8cD5GaXJzdCBhbmQgb25seSBsaW5lIG9mIGlucHV0IGNvbnRhaW5zIHJlYWwgbnVtYmVyIFAuJm5ic3A7PFwvcD5cclxuXHJcbjxwPlAgd2lsbCBoYXZlIGJldHdlZW4gMSBhbmQgOSBkZWNpbWFsIHBsYWNlcywgaW5jbHVzaXZlICgxICZsZTsgUCAmbGU7IDUpLiZuYnNwOzxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPkZpcnN0IGFuZCBvbmx5IGxpbmUgb2Ygb3V0cHV0IHNob3VsZCBjb250YWluIGZpdmUgbm9ubmVnYXRpdmUgaW50ZWdlcnMgLSBudW1iZXJzIG9mIG9uZXMsIHR3b3MsIHRocmVlcywgZm91cnMgYW5kIGZpdmVzIHVzZWQsIHJlc3BlY3RpdmVseS4gSWYgdGhlcmUgYXJlIG11bHRpcGxlIHNvbHV0aW9ucywgb3V0cHV0IGFueSBvbmUgb2YgdGhlbS48XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

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

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

채점

  • 예제는 채점하지 않는다.