CodechefAug 29, 2025

Chef and Chapters

Hazrat Ali

Codechef

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≤T≤1000
  • 1≤X,Y,Z≤1000

Sample 1:

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

Solution

#include <bits/stdc++.h>
using namespace std;

int main() {
    

    int t;
    cin >> t;
    while (t--) {
        long long x, y, z;
        cin >> x >> y >> z;
        cout << x * y * z << "\n";
    }
    return 0;
}






Comments