#abc246d. D - 2-variable Function
D - 2-variable Function
Score : points
问题描述
给定一个整数 ,找出满足以下所有条件的最小整数 。
- 不小于 。
- 存在一对非负整数 使得 。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Given an integer , find the smallest integer that satisfies all of the conditions below.
- is greater than or equal to .
- There is a pair of non-negative integers such that .
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
9
Sample Output 1
15
For any integer such that , there is no that satisfies the condition in the statement.
For , satisfies the condition.
Sample Input 2
0
Sample Output 2
0
itself may satisfy the condition.
Sample Input 3
999999999989449206
Sample Output 3
1000000000000000000
Input and output may not fit into a -bit integer type.
update @ 2024/3/10 10:33:24