시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 143 39 31 34.831%

문제

상근이는 종이에 숫자를 쓰려고 한다. 종이에는 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+NSBcdWMwYWNcdWM3NzRcdWM3NTggXHVjMjJiXHVjNzkwXHViOTdjIDFcdWFjMWNcdWI5Y2MgXHVjNGY4IFx1YzIxOCBcdWM3ODhcdWFjZTAsIFx1YzBjMVx1YWRmY1x1Yzc3NFx1YjI5NCBcdWM4ODVcdWM3NzRcdWI5N2MgXHViYjM0XHVkNTVjXHVhYzFjIFx1YWMwMFx1YzljMFx1YWNlMCBcdWM3ODhcdWIyZTQuPFwvcD5cclxuXHJc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HF1YW50aXR5IG9mIGVhY2ggdHlwZSBvZiBwYXBlci4mbmJzcDs8XC9wPlxyXG5cclxuPHA+TWlya28mcnNxdW87cyB0YXNrIGlzIHRvIHBpY2sgdGhlIG1pbmltdW0gbnVtYmVyIG9mIHBhcGVycyBpbiBhIHdheSB0aGF0IHRoZSBhdmVyYWdlIG9mIHRoZSBudW1iZXJzIHdyaXR0ZW4gb24gdGhlbSBlcXVhbHMgZXhhY3RseSBQLiZuYnNwOzxcL3A+XHJcbiIsImlucHV0IjoiPHA+Rmlyc3QgYW5kIG9ubHkgbGluZSBvZiBpbnB1dCBjb250YWlucyByZWFsIG51bWJlciBQLiZuYnNwOzxcL3A+XHJcblxyXG48cD5QIHdpbGwgaGF2ZSBiZXR3ZWVuIDEgYW5kIDkgZGVjaW1hbCBwbGFjZXMsIGluY2x1c2l2ZSAoMSAmbGU7IFAgJmxlOyA1KS4mbmJzcDs8XC9wPlxyXG4iLCJvdXRwdXQiOiI8cD5GaXJzdCBhbmQgb25seSBsaW5lIG9mIG91dHB1dCBzaG91bGQgY29udGFpbiBmaXZlIG5vbm5lZ2F0aXZlIGludGVnZXJzIC0gbnVtYmVycyBvZiBvbmVzLCB0d29zLCB0aHJlZXMsIGZvdXJzIGFuZCBmaXZlcyB1c2VkLCByZXNwZWN0aXZlbHkuIElmIHRoZXJlIGFyZSBtdWx0aXBsZSBzb2x1dGlvbnMsIG91dHB1dCBhbnkgb25lIG9mIHRoZW0uPFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

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

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