Algorithm
problem Link - :https://www.codechef.com/problems/BIRYANI
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 weeks, and the cost of classes per week is 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 — the number of test cases. The description of test cases follows.
- The first and only line of each test case contains two space-separated integers and , 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
Sample 1:
4 1 10 1 15 2 10 2 15
10 15 20 30
Explanation:
Test case : Chef will be required to attend the MasterChef's classes for week and the cost of classes per week is coins. Hence, Chef will have to pay coins in total.
Test case : Chef will be required to attend the MasterChef's classes for week and the cost of classes per week is coins. Hence, Chef will have to pay coins in total.
Test case : Chef will be required to attend the MasterChef's classes for weeks and the cost of classes per week is coins. Hence, Chef will have to pay coins in total.
Test case : Chef will be required to attend the MasterChef's classes for weeks and the cost of classes per week is coins. Hence, Chef will have to pay coins in total.
Code Examples
#1 Code Example with C Programming
Code -
C Programming
#include<stdio.h>
int main(void) {
int t,x,y;
scanf("%d",&t);
while(t--)
{
scanf("%d %d",&x,&y);
printf("%d\n",x*y);
}
return 0;
}
Copy The Code &
Try With Live Editor
Input
1 10
1 15
2 10
2 15
Output
15
20
30
Demonstration
CodeChef solotion BIRIYANI - Biryani classes CodeChef solotion in C,C++