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.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Check if N rectangles of equal area can be formed from (4 * N) integers
- Number of unique rectangles formed using N unit squares
- Minimum area of square holding two identical rectangles
- Smallest N digit number whose sum of square of digits is a Perfect Square
- Find side of Square which makes minimal area to fit two identical rectangles inside it
- Largest square which can be formed using given rectangular blocks
- 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
- Number formed after K times repeated addition of smallest divisor of N
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
- Lexicographically smallest array formed by at most one swap for every pair of adjacent indices
- Smallest number whose square has N digits
- Smallest number whose sum of digits is square of N
- Find the Side of the smallest Square that can contain given 4 Big Squares
- Smallest perfect square divisible by all elements of an array
- Find smallest perfect square number A such that N + A is also a perfect square number
- Nth term of a sequence formed by sum of current term with product of its largest and smallest digit
- Find smallest number formed by inverting digits of given number N
- Check if a number is perfect square without finding square root
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.