시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 512 MB 69 31 26 53.061%

문제

The State Veterinary Services Department recently reported an outbreak of a newly found cow disease. All cows found to have affected by the disease have since euthanized because of the risk to the industry. Number of affected cows increased to 21, 34 and reached 55 after eight, nine and ten hours respectively.

You have been assigned by the authority to study the pattern of the outbreak and develop a program to predict the next number of affected cows so that the authorities could prepare and act accordingly.

입력

Input will consist of a series of positive integer numbers no greater than 490 each on a separate line represent the hours. The input process will be terminated by a line containing -1.

출력

For each input value, the output contains a line in the format: Hour X: Y cow(s) affected, where X is the hour, and Y is the total affected cows that need to be euthanized based on the hour given by X.

예제 입력 1

1
4
6
11
-1

예제 출력 1

Hour 1: 1 cow(s) affected
Hour 4: 3 cow(s) affected
Hour 6: 8 cow(s) affected
Hour 11: 89 cow(s) affected