P19787 [GeeksforGeeks] Learn geometry5429
普及-
题目描述

Find max number of squares (S) of side 2 units that can fit in an Isosceles triangle with a right angle and its shortest side equal to "B" units.
Note: The squares don't have to fit completely inside the Triangle.

Example 1:
Input:
B = 1
Output:
0
Explanation:
We can't fit any squares.
Example 2:
Input:
B = 10
Output:
10
Explanation:
We can fit 10 squares of 2 unit sides
in an Isosceles Right Traingle with
the shortest side being 10 unit length.

Your Task:
You don't need to read input or print anything. Your task is to complete the function maxSquares() which takes an Integer B as input and returns the answer.

Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

Constraints:
1 <= B <= 10^{9}

输入格式

见题面

输出格式

见题面

样例输入
B = 1
样例输出
0