[Solution] Garage Codeforces Solution | Solution Codeforces
G. Garage
time limit per test
1 secondmemory limit per test
128 megabytesinput
standard inputoutput
standard outputPak Chanek plans to build a garage. He wants the garage to consist of a square and a right triangle that are arranged like the following illustration.
Define and as the lengths of two of the sides in the right triangle as shown in the illustration. An integer is suitable if and only if we can construct a garage with assigning positive integer values for the
👇👇👇👇👇
lengths and () so that the area of the square at the bottom is exactly . As a good friend of Pak Chanek, you are asked to help him find the -th smallest suitable number.
Input
The only line contains a single integer ().
Output
An integer that represents the -th smallest suitable number.
No comments:
Post a Comment