| ||||||||||
| 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 | |||||||||
不知道为什么是RUN TIME EXCEED 啊#include<stdio.h>
void main(){
int n;
for(;;){
scanf("%d",&n);
while(n!=0){
n=n/10000+n/1000-10*(n/10000)+n/100-100*(n/10000)-10*(n/1000)+n/10-1000*(n/10000)-100*(n/1000)-10*(n/100)+n-10000*(n/10000)-1000*(n/1000)-100*(n/100)-10*(n/10);
if(n/10==0)
break;
}
if(n==0)break;
else
printf("%d\n",n);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator