| ||||||||||
| 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 | |||||||||
智商上的自卑感油然而生In Reply To:前人好办法。。PF Posted by:taoy at 2007-11-20 21:30:22 #include<stdio.h>
int main()
{
int n,i,j;
while(scanf("%d",&n)!=EOF)
{
j=1;
for(i=1;;i++)
{
j%=n;
if(j)
j=j*10+1;
else
break;
}
printf("%d\n",i);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator