2018年1月13日 星期六

UVA Q10633 - Rare Easy Problem

#include<iostream>
#include<iomanip>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
unsigned long long int a,b;
while(cin>>a){
    if(a==0){
        break;
    }
    b=0;
    for(int x=9;x>=0;x--){
    if(((10*a)-x)%9==0){
        if(b!=0){
            cout<<" ";
        }
        b++;
        cout<<((10*a)-x)/9;
    }
    }
    cout<<endl;
}


system("pause");
return 0;
}

沒有留言:

張貼留言