文件名称:acjanchan
介绍说明--下载内容来自于网络,使用问题请自行百度
2^x mod n = 1 acm竞赛题 Give a number n, find the minimum x that satisfies 2^x mod n = 1.
Input
One positive integer on each line, the value of n.
Output
If the minimum x exists, print a line with 2^x mod n = 1.
Print 2^? mod n = 1 otherwise.
You should replace x and n with specific numbers.
Sample Input
2
5
Sample Output
2^? mod 2 = 1
2^4 mod 5 = 1-2 ^ x mod n = 1 acm contest Give a number n, find the minimum that satisfies 2 x ^ x mod n = 1. In One positive integer put on each line. the value of n. Output If the minimum x exists, print a line with 2 ^ x mod n = 1. Print mod n ^ 2 = 1 oth erwise. You should replace x and n with specific numbers. Sample Sample Input Output 2 5 2 ^ = 2 mod 1 2 ^ 4 = mod 5 1
Input
One positive integer on each line, the value of n.
Output
If the minimum x exists, print a line with 2^x mod n = 1.
Print 2^? mod n = 1 otherwise.
You should replace x and n with specific numbers.
Sample Input
2
5
Sample Output
2^? mod 2 = 1
2^4 mod 5 = 1-2 ^ x mod n = 1 acm contest Give a number n, find the minimum that satisfies 2 x ^ x mod n = 1. In One positive integer put on each line. the value of n. Output If the minimum x exists, print a line with 2 ^ x mod n = 1. Print mod n ^ 2 = 1 oth erwise. You should replace x and n with specific numbers. Sample Sample Input Output 2 5 2 ^ = 2 mod 1 2 ^ 4 = mod 5 1
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1489.cpp
1608.cpp
1949.cpp
2060.cpp
www.dssz.com.txt
1608.cpp
1949.cpp
2060.cpp
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.