Codeforces Round #206 (Div. 2) A. Vasya and Digital Root

OpenSoucre發表於2013-10-14
#include <iostream>

using namespace std;

int main(){
    int k,d;
    cin >> k >>d;
    if(d==0) {
         k > 1 ? (cout<<"No solution"<<endl):(cout<<0<<endl);
    }
    else{
        cout<<d;
        for(int i = 1 ; i < k; ++ i) cout<<0;
        cout<<endl;
    }
}

 

相關文章