Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
This semester, Chef took X courses. Each course has Y units and each unit has Z chapters in it.
Find the total number of chapters Chef has to study this semester.
For each test case, output in a single line the total number of chapters Chef has to study this semester.
Input: 3
1 1 1
2 1 2
1 2 3
Output: 1
4
6
Test case 1: There is only 1 course with 1 unit. The unit has 1 chapter. Thus, the total number of chapters is 1.
Test case 2: There are 2 courses with 1 unit each. Thus, there are 2 units. Each unit has 2 chapters. Thus, the total number of chapters is 4.
Test case 3: There is only 1 course with 2 units. Each unit has 3 chapters. Thus, the total number of chapters is 6.
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--)
{
int x,y,z;
cin>>x>>y>>z;
cout<<x*y*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();
int b=sc.nextInt();
int c=sc.nextInt();
System.out.println(a*b*c);
}
}
}
for i in range(int(input())):
x,y,z=map(int,input().split())
print(x*y*z)
In our experience, we suggest you solve this Chef and Chapters 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 Chef and Chapters CodeChef Solution
I hope this Chef and Chapters 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 >>