-
Notifications
You must be signed in to change notification settings - Fork 0
/
Biryani classes
59 lines (44 loc) · 1.75 KB
/
Biryani classes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Problem
According to a recent survey, Biryani is the most ordered food. Chef wants to learn how to make world-class Biryani from a MasterChef. Chef will be required to attend the MasterChef's classes for XX weeks, and the cost of classes per week is YY coins. What is the total amount of money that Chef will have to pay?
Input Format
The first line of input will contain an integer TT — the number of test cases. The description of TT test cases follows.
The first and only line of each test case contains two space-separated integers XX and YY, as described in the problem statement.
Output Format
For each test case, output on a new line the total amount of money that Chef will have to pay.
Constraints
1 \leq T \leq 10^41≤T≤10
4
1 \leq X, Y \leq 1001≤X,Y≤100
Sample 1:
Input
Output
4
1 10
1 15
2 10
2 15
10
15
20
30
Explanation:
Test case 11: Chef will be required to attend the MasterChef's classes for 11 week and the cost of classes per week is 1010 coins. Hence, Chef will have to pay 1010 coins in total.
Test case 22: Chef will be required to attend the MasterChef's classes for 11 week and the cost of classes per week is 1515 coins. Hence, Chef will have to pay 1515 coins in total.
Test case 33: Chef will be required to attend the MasterChef's classes for 22 weeks and the cost of classes per week is 1010 coins. Hence, Chef will have to pay 2020 coins in total.
Test case 44: Chef will be required to attend the MasterChef's classes for 22 weeks and the cost of classes per week is 1515 coins. Hence, Chef will have to pay 3030 coins in total.
ANSWER:
#include <iostream>
using namespace std;
int main() {
int t;
int A;
int B;
cin>>t;
while(t)
{
cin>>A>>B;
cout<<A*B<<endl;
t--;
}
return 0;
}