Company: BNY Codedivas 2026
Difficulty: medium
Anna has a cuboidal box with length l , breadth b and height h . She wants to make the volume of this box 0 by cutting pieces out of it. At a time, she can cut and remove either Y units of length, or breadth, or height. Y, here is equal to the GCD of the current values of length, height, and breadth. Your task is to find and return the minimum number of operations required to make the volume of the cuboid equal to 0. Input Specification: input1 : An integer value l representing the length of the cuboid. input2 : An integer value b representing the width of the cuboid. input3 : An integer value h representing the weight of the cuboid. Output Specification: Return an integer value representing the minimum number of operations required to make the volume of the cuboid equal to 0. Example 1: input1 : 4 input2 : 7 input3 : 8 Output : 3 Explanation: Here, we have l = 4, b = 7, h = 8. To find the minimum number of operations required to make the volume of the cuboid equal to 0, we can follow