Codeforces 584A. Olesya and Rodion Solution
Solution in C++:
///La ilaha illellahu muhammadur rasulullah
///******Bismillahir-Rahmanir-Rahim******///
///AH Tonmoy
///Department of CSE,23rd batch
///Islamic University,Bangladesh
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n,t,i;
- cin>>n>>t;
- if((n==1)&&(t==10))
- {
- cout<<"-1"<<endl;
- return 0;
- }
- else if(t==10)
- {
- cout<<t;
- for(i=2; i<n; i++)
- cout<<"0";
- }
- else
- {
- cout<<t;
- for(i=2; i<=n; i++)
- cout<<"0";
- }
- cout<<endl;
- }
No comments