GUPTA MECHANICAL

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

Thursday 22 September 2022

[Solution] Alice and Marks CodeChef Solution



Problem

Alice has scored X marks in her test and Bob has scored Y marks in the same test. Alice is happy if she scored at least twice the marks of Bob’s score. Determine whether she is happy or not.

Input Format

  • The first and only line of input contains two space-separated integers X, Y — the marks of Alice and Bob respectively.

Output Format

For each testcase, print Yes if Alice is happy and No if she is not, according to the problem statement.

The judge is case insensitive so you may output the answer in any case. In particular YESyes, yEsare all considered equivalent toYes`.

Explanation:

Alice has scored X = 2 marks whereas Bob has scored Y = 1 mark. As Alice has scored twice as much as Bob (i.e. X \geq 2Y), the answer is Yes.


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


Explanation:

Alice has scored X = 1 mark whereas Bob has scored Y = 2 marks. As Alice has not scored twice as much as Bob (i.e. X \lt 2Y), the answer is No.

No comments:

Post a Comment