Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
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.
For each test case, output the maximum number of submissions a participant can make in X minutes.
Input: 4
1
2
3
4
Output: 2
4
6
8
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.
#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;
}
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int a=sc.nextInt();
System.out.println((a*60)/30);
}
}
}
n=int(input())
for i in range(n):
n1=int(input())
print(n1*2)
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
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 >>