304 North Cardinal St.
Dorchester Center, MA 02124

# Chef and Chapters CodeChef Solution

## Problem – Chef and Chapters CodeChef Solution

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.

### Input Format

• The first line will contain T, the number of test cases. Then the test cases follow.
• Each test case consists of a single line of input, containing three space-separated integers X,Y, and Z.

### Output Format

For each test case, output in a single line the total number of chapters Chef has to study this semester.

### Constraints

• 1 \leq T \leq 10001≤T≤1000
• 1 \leq X, Y, Z \leq 10001≤X,Y,Z≤1000

### Sample 1:

Input: 3
1 1 1
2 1 2
1 2 3
Output: 1
4
6

### Explanation:

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.

### Chef and Chapters CodeChef Solution in C++17

#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;
}


### Chef and Chapters CodeChef Solution in Java

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);
}
}
}


### Chef and Chapters CodeChef Solution in Pyth 3

for i in range(int(input())):
x,y,z=map(int,input().split())
print(x*y*z)
##### Chef and Chapters CodeChef Solution Review:

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

Find on CodeChef

##### Conclusion:

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 >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions