GUPTA MECHANICAL

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

Wednesday 19 October 2022

[Solution] Odd Sum Pair CodeChef Solution




Problem

Chef has 3 numbers A, B and C.

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 T, denoting the number of test cases.
  • Each test case consists of three integers A, B, C.

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 YESyesyeS, and Yes are all considered the same.

Solution Click Below:-  👉CLICK HERE👈
👇👇👇👇👇

Explanation:

Test case 1: Chef can choose 2 and 3 since 2 + 3 = 5 and 5 is odd.

Test case 2: It can be shown that Chef cannot choose two numbers among 84 and 6 with odd sum.

No comments:

Post a Comment