GUPTA MECHANICAL

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

Sunday 14 August 2022

[Solution] Maximum Submissions CodeChef Solution


Problem

A participant can make 1 submission every 30 seconds. If a contest lasts for X minutes, what is the maximum number of submissions that the participant can make during it?

It is also given that the participant cannot make any submission in the last 5 seconds of the contest.

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, denoting the number of minutes.

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

Output Format

For each test case, output the maximum number of submissions a participant can make in X minutes.


Explanation:

Test case 1: The contest lasts for 1 minute, which is 60 seconds. A participant can make 2 submissions during this time — for example, in the 5-th second and in the 48-th second. Making 3 or more submissions is impossible.

Test case 2: The contest lasts for 2 minutes, which is 120 seconds. A participant can make 4 submissions during this time.

No comments:

Post a Comment