Split the Cuboid
Practice
5 (1 votes)
Problem
46% Success 320 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code

You are given a cuboid with integer dimensions: \(L, B, H\). You wish to split the entire cuboid into cubes of equal dimension. What is the minimum number of cubes which can be obtained?

Input Format

First-line consists of T, the number of test cases.

Next T lines consist of 3 space-separated integers: L, B, and H.

Output Format

Print T lines, each line consisting of the minimum number of cubes that can be obtained.

Constraints

\(1 \leq T \leq 1000 \\ 1 \leq L, B, H \leq 1000\)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:20
1 votes
Tags:
Easy
Points:20
2 votes
Points:20
9 votes
Tags:
MathematicsOpenApprovedEasyGreatest common divisor