Broken Phone Codechef Solution

We Are Discuss About CODECHEF SOLUTION

Broken Phone Codechef Solution

Broken Phone Codechef Solution

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

Problem

Uttu broke his phone. He can get it repaired by spending X rupees or he can buy a new phone by spending Y rupees. Uttu wants to spend as little money as possible. Find out if it is better to get the phone repaired or to buy a new phone.

Input Format

  • The first line contains a single integer T — the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains two space-separated integers X and Y — the cost of getting the phone repaired and the cost of buying a new phone.

Output Format

For each test case,

  • output REPAIR if it is better to get the phone repaired.
  • output NEW PHONE if it is better to buy a new phone.
  • output ANY if both the options have the same price.

You may print each character of REPAIRNEW PHONE and ANY in uppercase or lowercase (for example, anyANyAny will be considered identical).

Constraints

  • 1 \leq T \leq 1000
  • 1 \le X, Y \le 10^4

Sample 1:

Input

Output

3
100 1000
10000 5000
3000 3000
REPAIR
NEW PHONE
ANY

Explanation:

Test Case 1: It is better to get the phone repaired since 100 \lt 1000.

Test Case 2: It is better to buy a new phone since 10000 \gt 5000.

Test Case 3: Uttu can choose either of the two options since 3000 = 3000.

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

 

SOLUTION

Broken Phone Codechef Solution

Yhaa You have done it but next? if YOU Want to Get Others Please Visit Here JOIN NOW

Answers will be Uploaded Shortly and it will be Notified on Telegram, So JOIN NOW
JoinScishowEngineerTelegram

Related Posts

Leave a Reply

Your email address will not be published.

adplus-dvertising