309722: CF1725G. Garage
Memory Limit:128 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Garage
题意翻译
给出$N$,请求出$b^2 - a ^ 2$的第$N$小值,其中$a, b \in \mathbb{N}^+$题目描述
Pak 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. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1725G/7e485d3e8037daefec2b8ca00b8b11546f3e5f77.png)Define $ a $ and $ b $ as the lengths of two of the sides in the right triangle as shown in the illustration. An integer $ x $ is suitable if and only if we can construct a garage with assigning positive integer values for the lengths $ a $ and $ b $ ( $ a<b $ ) so that the area of the square at the bottom is exactly $ x $ . As a good friend of Pak Chanek, you are asked to help him find the $ N $ -th smallest suitable number.输入输出格式
输入格式
The only line contains a single integer $ N $ ( $ 1 \leq N \leq 10^9 $ ).
输出格式
An integer that represents the $ N $ -th smallest suitable number.
输入输出样例
输入样例 #1
3
输出样例 #1
7