Monday, September 16, 2019

Codeforce A. Vasya and Digital Root

  1. #include< iostream >
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int k, d;
  7. cin >> k >> d;
  8. if(d == 0 and k > 1) return cout << "No solution\n", 0;
  9. cout << d ;
  10. while(--k) cout << 0 ;
  11. return 0;
  12. }

No comments: