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" #include "math.h" int main() { long i,n,k,t,a,m=0; while(1) { scanf("%ld",&n); if(n==0) break; a=n; m=m+1; for(i=0;n;i++) n=n/10; for(k=1;i;i--) k=k*10; for(t=1;t<=10;t++) { if((a+k*t)%11==0) { printf("%ld. %ld\n",m,(a+k*t)/11); break; } } if(t==11)printf("%ld. IMPOSSIBLE\n",m); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator