HOJ1008

HOJ1008

 #include<iostream>
using namespace std; int main(){
int N = ; int M = ;
while(scanf("%d %d",&N,&M) == ){
int numTemp = ; int count = ;
numTemp = N;
while(!(numTemp % M == ) && count <= M){
numTemp = * (numTemp % M) + N;  /*由于numTemp是以指数阶增加的,防止numTemp越界错误*/
count++;
}
if(count == M+){
printf("0\n");
}else{
printf("%d\n",count);
}
}
return ;
}
上一篇:play wav sound


下一篇:IOS 表视图(UITableVIew)的使用方法(5)表视图的编辑功能(删除)