UACC 1 P1 - Bench Press Bob

View as PDF

Submit solution


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

Author:
Problem type

It's springtime again in Unionville! Bob wants to get in shape before the summer break, so he has decided to start bench pressing!

In order to bench press, Bob will start with a 45 pound barbell. He can then add a certain number (possibly 0) of 45 pound plates to the barbell; however he must make sure that they come in pairs, or else the barbell won't be balanced!

Help Bob determine whether it's possible to create a weight of N pounds!

Constraints

1 \le N \le 10^5

Input Specification

The first line contains the integer N, the weight Bob wants to construct.

Output Specification

Output Let's go Bob! if Bob can create a weight of N pounds whilst adhering to the rules above, or Rip Bob! if he can't.

Sample Input 1

225

Sample Output 1

Let's go Bob!

Explanation for Sample 1

Bob can add two pairs of plates with a total weight of 2 \times 2 \times 45 = 180 pounds. Adding these two to the 45 pound barbell would result in a 225 pound weight.

Sample Input 2

90

Sample Output 2

Rip Bob!

Explanation for Sample 2

Bob will start with a 45 pound barbell. Subtracting this 45 from the desired 90 pounds, we are left with arranging the remaining 45 pounds using plates. Each plate weighs 45 pounds, meaning we would only need 1 plate to achieve our desired 90 pounds. However, plates must come in pairs, or else the barbell will not be balanced. Thus, it is impossible for Bob to construct such weight.


Comments

There are no comments at the moment.