#abc330c. C - Minimize Abs 2
C - Minimize Abs 2
Score : points
问题描述
给定一个正整数 。
求非负整数 和 使得 的最小值。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given a positive integer .
Find the minimum value of for non-negative integers and .
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
21
Sample Output 1
1
For and , we have .
There are no non-negative integers and such that , so the answer is .
Sample Input 2
998244353
Sample Output 2
0
Sample Input 3
264428617
Sample Output 3
32
update @ 2024/3/10 01:13:40