| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
这个程序为什么会超时啊?#include<stdio.h>
int main(){
int n,i,j;
for(;scanf("%d",&n);){
if(n){
i=1;
j=1;
while(i!=0){
i=(i*10+1)%n;
j++;
}
printf("%d\n",j);}
else
return 1;
}
return 1;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator