GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Wednesday 27 April 2022

Chef and Chapters CodeChef Solution | CodeChef Problem Solution 2022

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

  • 1T1000
  • 1X,Y,Z1000
Solution Click Below:- 

Sample Input 1 

3
1 1 1
2 1 2
1 2 3

Sample Output 1 

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.

Chef and Chapters CodeChef Solution | CodeChef Problem Solution 2022

Presents for Cheffina CodeChef Solution | CodeChef Problem Solution 2022

Chef and Bird farm CodeChef Solution | CodeChef Problem Solution 2022

Valentine Vex CodeChef Solution | CodeChef Problem Solution 2022

Buying Sweets CodeChef Solution | CodeChef Problem Solution 2022

Reduce to 1 CodeChef Solution | CodeChef Problem Solution 2022

Three Arrays CodeChef Solution | CodeChef Problem Solution 2022

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.

Join Now for Solution:- 

No comments:

Post a Comment