UVA2037】的更多相关文章

#include<cstdio> int Sum(int n) { int sum=0; while(n!=0) { sum+=n%10; n/=10; } return sum; } void Cal(int a,int b) { while(a!=b) { if(a<b) { a+=Sum(a); } else { b+=Sum(b); } } printf("%d\n",a); } int main() { int n; int count=1; while(~…