[Solution] Odd Sum Pair CodeChef Solution
Problem
Chef has numbers and .
Chef wonders if it is possible to choose exactly two numbers out of the three numbers such that their sum is odd.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of three integers .
Output Format
For each test case, output YES
if you can choose exactly two numbers with odd sum, NO
otherwise.
The output is case-insensitive. Thus, the strings YES
, yes
, yeS
, and Yes
are all considered the same.
👇👇👇👇👇
Explanation:
Test case 1: Chef can choose and since and is odd.
Test case 2: It can be shown that Chef cannot choose two numbers among , and with odd sum.
No comments:
Post a Comment