Codechef•Aug 21, 2025
Chess Time
Hazrat Ali
Codechef
Chef has recently started playing chess, and wants to play as many games as possible.
He calculated that playing one game of chess takes at least 20 minutes of his time.
Chef has N hours of free time. What is the maximum number of complete chess games he can play in that 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 line containing a single integer, N.
Output Format
For each test case, output on a new line the maximum number of complete chess games Chef can play in N hours.
Constraints
- 1≤T≤10
- 1≤N≤10
Sample 1:
Input
4 1 10 7 3
Output
3 30 21 9
Solution
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int p;
cin >> p;
cout << p * 3 << "\n";
}
return 0;
}