Codeforces 584 A . Olesya and Rodion
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int main()
{
ios_base::sync_with_stdio(false);
int n , t;
while(cin >> n >> t)
{
if(t==10)
{
if(n==1)
{
cout << "-1\n";
continue;
}
cout << "1";
for(int i=2; i<=n; i++) cout << "0";
cout << "\n";
continue;
}
for(int i=1; i<=n; i++) cout << t;
cout << "\n";
}
return 0;
}
using namespace std;
typedef long long LL;
int main()
{
ios_base::sync_with_stdio(false);
int n , t;
while(cin >> n >> t)
{
if(t==10)
{
if(n==1)
{
cout << "-1\n";
continue;
}
cout << "1";
for(int i=2; i<=n; i++) cout << "0";
cout << "\n";
continue;
}
for(int i=1; i<=n; i++) cout << t;
cout << "\n";
}
return 0;
}
Comments
Post a Comment