You are required to build some sheets of rectangular shape of Area A. To build a sheet of an Area A of Dimensions L & B. You have two conditions:
1) L and B can not be in decimals.
2) When L and B are even, L must be Equal to B.
Calculate the number of possible choices to build a sheet of area A.
Input: A = 4 Output: 2 Explaination: The possible combinations are (1, 4) and (2, 2). Note that order does not matter. (1, 4) and (4, 1) are same.
Input: A = 7 Output: 1 Explaination: The only possible combination is (1, 7).
You do not need to read input or print anything. Your task is to complete the function rectangleCount() which takes A as input parameters and returns the number of possible combinations of (L, B).
Expected Time Complexity: O( sqrt(A) )
Expected Auxiliary Space: O(1)
1 ≤ A ≤ 105
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.