2286: 2025(2025年3月C++三级)
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:21
Solved:16
Description
小 A 有一个整数 x ,他想找到最小的正整数 y 使得下式成立:
(x and y) + (x or y) =2025
其中,and 表示二进制按位与运算,or 表示二进制按位或运算。如果不存在满足条件的 y ,则输出 -1。
(x and y) + (x or y) =2025
其中,and 表示二进制按位与运算,or 表示二进制按位或运算。如果不存在满足条件的 y ,则输出 -1。
Input
一行,一个整数 x。
Output
一行,一个整数,若满足条件的 y 存在则输出 y,否则输出 -1。
Sample Input Copy
1025
Sample Output Copy
1000
HINT
对于所有测试点,保证 0 <= x < 2025。

