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 |
有童鞋帮忙看一下,为什么超时了么、、一样的想法(虽然有点相当的那个~),别人的就是0ms,悲剧!#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator