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

#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;
    }
}
原文地址:https://www.cnblogs.com/xiongqiangcs/p/3369313.html