Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

有童鞋帮忙看一下,为什么超时了么、、一样的想法(虽然有点相当的那个~),别人的就是0ms,悲剧!

Posted by SWUST_smiles at 2010-08-08 22:01:46 on Problem 2551
#include <stdio.h>
int main()
{
int o,i;
__int64 sum;
while(scanf("%d",&o)!=EOF)
	{
	sum=1;
	i=1;
	while(sum%o!=0) {i++;sum=sum*10+1;}
	printf("%d\n",i);
	}
return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator