[Solution] Equal Distribution Codechef Solution
Alice and Bob are very good friends and they always distribute all the eatables equally among themselves.
Alice has chocolates and Bob has chocolates. Determine whether Alice and Bob can distribute all the chocolates equally among themselves.
Note that:
- It is not allowed to break a chocolate into more than one piece.
- No chocolate shall be left in the distribution.
Solution Click Below:- CLICK HERE
Input Format
- The first line of input will contain an integer — the number of test cases. The description of test cases follows.
- The first and only line of each test case contains two space-separated integers
- and , the number of chocolates that Alice and Bob have, respectively.
Output Format
For each test case, output on a new line if Alice and Bob can distribute all the chocolates equally, else output . The output is case insensitive, i.e, , , will all be accepted as correct answers when Alice and Bob can distribute the chocolates equally.
No comments:
Post a Comment