标签:blog io ar for div on log amp as
#include<stdio.h> int main() { long int n,i,s=0; while(scanf("%d",&n)!=EOF) { int flag=0; for(i=n-46;i<=n;i++) { s=i%10+i/10%10+i/100%10+i/1000%10+i/10000%10; if(s+i==n) { flag=1; break; } } if(flag) printf("%ld\n",i); else printf("0\n"); } }
没有通过,待解决。
标签:blog io ar for div on log amp as
原文地址:http://www.cnblogs.com/wuyuewoniu/p/4050182.html