Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Speed Reading
Description All Cow S ≤ 100) pages per minute, a maximum consecutive reading time _{i}T (1 ≤ _{i}T ≤ 100) minutes, and a minimum rest time _{i}R (1 ≤ _{i}R ≤ 100) minutes. The cow can read at a rate of _{i}S pages per minute, but only for _{i}T minutes at a time. After she stops reading to rest, she must rest for _{i}R minutes before commencing reading again._{i}Determine the number of minutes (rounded up to the nearest full minute) that it will take for each cow to read the book. Input * Line 1: Two space-separated integers: T , and _{i}R _{i}Output * Lines 1.. Sample Input 10 3 2 4 1 6 1 5 3 3 3 Sample Output 6 7 7 Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator