Mock CCC14J1 - Love Overdose

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 16M

Problem type
2014 Mock CCC by Alex and Timothy

Alice has a crush on her friend Bob, but she is too shy to express it. From an ancient recipe passed down through her family, she has concocted a vial of love potion. She plans to slip this potion into Bob's food every day so he will love her forever. The only problem is that the potion is so potent, taking too much can make Bob overdose, resulting in him being utterly indifferent towards her.

According to a note on the recipe, if some amount of the potion is ingested one day, only 50\% of that amount is retained in the body on the next day, and 0\% of that amount is retained on the day after that. You are given A and B, the amount of love potion in mL that Alice gives to Bob on the first and second day, respectively, and R, the recommended dosage in mL, according to her recipe. Write a program to determine whether Bob overdoses on the first day, the second day, or neither. Note that if Bob overdoses on the first day, he cannot overdose again on the second.

Input Specification

Three lines, containing the three non-negative integers A, B, and R, each no greater than 1000.

Output Specification

If he overdoses on the first day, output Bob overdoses on day 1. If he overdoses on the second day, output Bob overdoses on day 2. Otherwise, output Bob never overdoses.

Sample Input 1


Sample Output 1

Bob overdoses on day 2.

Sample Input 2


Sample Output 2

Bob never overdoses.


For the first example, Alice slips Bob 100 mL of the potion on day one, of which, only 50 mL remain in Bob's body on day two. 50 mL is added on top of the 200 mL that he ingests on day two to make 250 mL, which is barely enough to make him overdose the recommended dosage of 249 mL.

For the second example, the amount from day one reduces to 25 mL on day two, when he is given another 100 mL to yield a total of 125 mL for the second day. 125 mL happens to be just the right dosage, so he does not overdose.