11891: 2^x mod n = 1
Memory Limit:32 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:4
Solved:0
Description
给你一个正整数n,要求你找到最小的x(x>0)满足2^x mod n = 1。
Input
输入包含多组测试数据。每行一个正整数,代表n的值。
Output
如果最小的x存在,则输出2^x mod n = 1(注意x和n要用具体的值代替),否则输出2^? mod n = 1。
Sample Input Copy
2
5
Sample Output Copy
2^? mod 2 = 1
2^4 mod 5 = 1