GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Wednesday, 27 April 2022

Who is taller! CodeChef Solution | CodeChef Problem Solution 2022

Alice and Bob were having an argument about which of them is taller than the other. Charlie got irritated by the argument, and decided to settle the matter once and for all.

Charlie measured the heights of Alice and Bob, and got to know that Alice's height is X centimeters and Bob's height is Y centimeters. Help Charlie decide who is taller.

It is guaranteed that XY.

Solution Click Below:- 

Input Format

  • The first line of input will contain an integer T — the number of test cases. The description of T test cases follows.
  • The first and only line of each test case contains two integers X and Y, as described in the problem statement.

Output Format

For each test case, output on a new line A if Alice is taller than Bob, else output B. The output is case insensitive, i.e, both A and a will be accepted as correct answers when Alice is taller.

Constraints

  • 1T1000
  • 100X,Y200
  • XY

Sample Input 1 

2
150 160
160 150

Sample Output 1 

B
A

Explanation

Test case 1: In this case, 150<160 so Bob is taller than Alice.

Test case 2: In this case, 160>150 so Alice is taller than Bob.

Join Now for Solution:- 

No comments:

Post a Comment