Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Maximum Submissions CodeChef Solution

Problem – Maximum Submissions CodeChef Solution

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.

Output Format

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


  • 1≤T≤30
  • 1≤X≤30

Sample 1:

Input: 4
Output: 2


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.

Maximum Submissions CodeChef Solution in C++17

#include <iostream>
using namespace std;

int main() {
    int t;
    cin >> t;
    while (t--)
        int x; cin >> x;
        int y = (x*60);
        float z = y/30;
        cout << z << endl;

	return 0;

Maximum Submissions CodeChef Solution in Java

import java.util.*;
import java.lang.*;

class Codechef
	public static void main (String[] args) throws java.lang.Exception
		Scanner sc = new Scanner(;
		int t = sc.nextInt();
		    int a=sc.nextInt();

Maximum Submissions CodeChef Solution in Pyth 3

for i in range(n):
Maximum Submissions CodeChef Solution Review:

In our experience, we suggest you solve this Maximum Submissions CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.

If you are stuck anywhere between any coding problem, just visit Queslers to get the Maximum Submissions CodeChef Solution

Find on CodeChef


I hope this Maximum Submissions CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions

Leave a Reply

Your email address will not be published. Required fields are marked *