ZOJ 1489 运行正确,WA,应该是求最小X地方错了,真心求改正ZOJ Problem Set - 14892^x mod n = 1--------------------------------------------------------------------------------Time Limit:1 Second Memory Limit:32768 KB ---------------------

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 10:37:22

ZOJ 1489 运行正确,WA,应该是求最小X地方错了,真心求改正ZOJ Problem Set - 14892^x mod n = 1--------------------------------------------------------------------------------Time Limit:1 Second Memory Limit:32768 KB ---------------------
ZOJ 1489 运行正确,WA,应该是求最小X地方错了,真心求改正
ZOJ Problem Set - 14892^x mod n = 1
--------------------------------------------------------------------------------
Time Limit:1 Second Memory Limit:32768 KB
--------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------------------
#include
#include
int main()
{
int n,x,i,count,a;
scanf("%d",&n);
if(n%2==1)
{
a=1;
for(x=1;x

ZOJ 1489 运行正确,WA,应该是求最小X地方错了,真心求改正ZOJ Problem Set - 14892^x mod n = 1--------------------------------------------------------------------------------Time Limit:1 Second Memory Limit:32768 KB ---------------------
#include
#include
int main()
{
int n,x,i,count,a;
while(scanf("%d",&n)==1) // 多组输入
{
count=0; // 初始化count
if(n%2==1)
{
a=1;
for(x=1;x

ZOJ 1489 运行正确,WA,应该是求最小X地方错了,真心求改正ZOJ Problem Set - 14892^x mod n = 1--------------------------------------------------------------------------------Time Limit:1 Second Memory Limit:32768 KB --------------------- zoj 1259,例子过了,wa,程序有注释哦~Rails--------------------------------------------------------------------------------Time Limit:1 Second Memory Limit:32768 KB ------------------------------------------------------------------------------- 真心求解!浙大ZOJ平台上3168题,觉得很简单啊,但一直WA.坐等哭求大牛!Sort ZOJ7--------------------------------------------------------------------------------Time Limit: 1 Second Memory Limit: 32768 KB ----------------------- zoj 1205 老是WA,help我自己输入的数据都可以得出正确答案,但提交以后老是WA,谁能告诉我哪里错了代码如下//zoj 1205//2008 01 29#include#includeusing namespace std;int main(){int plus20(char a,char b,string::iterator su 不应该是Fa等于Fb,Wa大于Wb吗 正确的应该是怎样? 请选择“啊”的正确读音 这个主意真妙啊! ya wa na 这真叫人担心啊!ya na wa 多好吃的米啊!nga wa ya 美国地名后面的MA、WA,例如:Las Vegas,NVSeattle,WA,metro areaNewburybort,MA最好能翻译这几个地名Metro Area应该是某某地区吧, 现在的英语单词为什么两个音标,应该教哪个才正确 比如what [wa:t] [wDt] 请选择“啊”的正确读音这屋子真大啊!A(wa) B(ya) C(na)这个主意真妙啊!A(ya)B(wa)C(na)A(nga)B(ya)C(na)这真叫人担心啊!A(ya)B(na)C(wa) kao wa seattle wa 求高手解答导热油炉的正确运行方法. 看书正确的姿势应该是怎样的 ko ni qi wa ,wa da xi wa wa ta si wa si a wa se de su wo le wa ko to wa lv wa饭的wa怎么写