hdu-2097-Sky数

#include
using namespace std;
int main()
{
    int n,a,b,c,sum1,sum2,sum3;
    while(cin>>n&&n)
    {
        a=b=c=n;
        sum1=sum2=sum3=0;
        while(a)
        {
            sum1+=a%10;
            a/=10;
        }
        while(b)
        {
            sum2+=b%16;
            b/=16;
        }
        while(c)
        {
            sum3+=c%12;
            c/=12;
        }
        if(sum1==sum2&&sum1==sum3)
            cout<         else
            cout<     }
    return 0;
}

你可能感兴趣的:(hdu-2097-Sky数)