PROBLEM LINK:
Contest Division 1
Contest Division 2
Contest Division 3
Setter: Lavish Gupta
Tester: Tejas Pandey
Editorialist: Kanhaiya Mohan
DIFFICULTY:
Cakewalk
PREREQUISITES:
None
PROBLEM:
Chef went to a Salon and found N customers waiting for haircuts. From his past experience, he knows that the Salon takes M minutes per customer. Only one person can get their haircut at a time.
For how many minutes will Chef have to wait before he can get his haircut?
EXPLANATION:
We know that Salon takes M minutes per customer. Thus, time required for N customers would be N*M.
Chef will have to wait for N*M minutes before he can get his haircut.
TIME COMPLEXITY:
The time complexity is O(1) per test case.
SOLUTION:
Editorialist's Solution
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int n, m;
cin>>n>>m;
cout<<n*m<<endl;
}
return 0;
}