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 |
Re:有童鞋帮忙看一下,为什么超时了么、、一样的想法(虽然有点相当的那个~),别人的就是0ms,悲剧!In Reply To:有童鞋帮忙看一下,为什么超时了么、、一样的想法(虽然有点相当的那个~),别人的就是0ms,悲剧! Posted by:SWUST_smiles at 2010-08-08 22:01:46 > #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; > } 你测试数据97 不超时才怪 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator