Given a rectangle of length l and breadth b, we need to find the area of the smallest square which can be formed with the rectangles of these given dimensions.
Input : 1 2 Output : 4 We can form a 2 x 2 square using two rectangles of size 1 x 2. Input : 7 10 Output :4900
Let’s say we want to make a square of side length a from rectangles of length l & b. This means that a is a multiple of both l & b. Since we want the smallest square, it has to be the lowest common multiple (LCM) of l & b.
- Number of unique rectangles formed using N unit squares
- Smallest multiple of N formed using the given set of digits
- Length of the smallest number which is divisible by K and formed by using 1's only
- Find the area of the shaded region formed by the intersection of four semicircles in a square
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
- Find the Side of the smallest Square that can contain given 4 Big Squares
- Smallest perfect square divisible by all elements of an array
- Check if a number is perfect square without finding square root
- Sum of Areas of Rectangles possible for an array
- Number of rectangles in N*M grid
- Find all rectangles filled with 0
- Find if two rectangles overlap
- Create a matrix with alternating rectangles of O and X
- Count Distinct Rectangles in N*N Chessboard
- Total area of two overlapping rectangles
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.