#C11091. Smallest Square Side
Smallest Square Side
Smallest Square Side
You are given two integers X and Y representing the dimensions of a rectangle. Your task is to determine the smallest integer Z such that the area of a square with side Z is strictly greater than the area of the rectangle.
This can be expressed mathematically using the inequality:
\( Z^2 > X \times Y \)
Compute the product X \times Y and find the smallest integer Z that satisfies the above condition. You should read the input from stdin
and output your answer to stdout
.
inputFormat
The input consists of a single line containing two space-separated integers X and Y, where X and Y represent the dimensions of the rectangle.
Example:
5 4
outputFormat
Output a single integer Z, the smallest integer such that \( Z^2 > X \times Y \).
Example:
5## sample
5 4
5