# [Solution] Chef and Chapters solution codechef

Chef and Chapters solution codechef – This semester, Chef took XX courses. Each course has YY units and each unit has ZZ chapters in it.

## [Solution] Chef and Chapters solution codechef

Find the total number of chapters Chef has to study this semester.

### Input Format

• The first line will contain TT, 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,X,Y, and ZZ.

### Output Format

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

## [Solution] Chef and Chapters solution codechef

• 1T10001≤T≤1000
• 1X,Y,Z10001≤X,Y,Z≤1000

### Sample Input 1

3
1 1 1
2 1 2
1 2 3


### Sample Output 1

1
4
6


## Chef and Chapters solution codechef Explanation

Test case 11: There is only 11 course with 11 unit. The unit has 11 chapter. Thus, the total number of chapters is 11.

Test case 22: There are 22 courses with 11 unit each. Thus, there are 22 units. Each unit has 22 chapters. Thus, the total number of chapters is 44.

Test case 33: There is only 11 course with 22 units. Each unit has 33 chapters. Thus, the total number of chapters is 66.