GUPTA MECHANICAL

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

Wednesday, 9 November 2022

[Solution] Water Consumption CodeChef Solution



Problem

Recently, Chef visited his doctor. The doctor advised Chef to drink at least 2000 ml of water each day.

Chef drank X ml of water today. Determine if Chef followed the doctor's advice or not.

Input Format

  • The first line contains a single integer T — the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains one integer X — the amount of water Chef drank today.

Output Format

For each test case, output YES if Chef followed the doctor's advice of drinking at least 2000 ml of water. Otherwise, output NO.

You may print each character of the string in uppercase or lowercase (for example, the strings YESyEsyes, and yeS will all be treated as identical).

Explanation:

Test case 1: Chef followed the doctor's advice since he drank 2999 ml of water which is \ge 2000 ml.

Test case 2: Chef did not follow the doctor's advice since he drank 1450 ml of water which is \lt 2000 ml.

Test case 3: Chef followed the doctor's advice since he drank 2000 ml of water which is \ge 2000 ml.

No comments:

Post a Comment