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] Reach on Time CodeChef Solution



Problem

Chef has recently moved into an apartment. It takes 30 minutes for Chef to reach office from the apartment.

Chef left for the office X minutes before Chef was supposed to reach. Determine whether or not Chef will be able to reach on time.

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases.
  • Each test case consists of a single integer X.

Output Format

For each test case, output YES if Chef will reach on time, 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 leaves 30 minutes before he is supposed to reach, so he will reach the office exactly on time since it takes 30 minutes to commute.

Test case 2: Chef will reach 30 minutes early.

Test case 3: Chef will reach 16 minutes late.

No comments:

Post a Comment