-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path587A.cpp
More file actions
32 lines (24 loc) · 748 Bytes
/
587A.cpp
File metadata and controls
32 lines (24 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include<bits/stdc++.h>
using namespace std;
/*
long long max_num = (long long)(powl(10, n) - 1);
long long min_num = (long long)powl(10, n - 1);
double k = ceil((double)min_num / t);
// we check that is there a k st k*t lies in the range of min and max numbers
if(k*t >= min_num && k*t <= max_num){
cout << (long long)(k*t) << endl;
}
else{
cout << -1 << endl;
} */
int main(){
long long n; int t;
if (!(cin >> n >> t)) return 0;
if (t == 10) {
if (n == 1) cout << -1 << '\n';
else cout << '1' << string((size_t)(n-1), '0') << '\n';
} else {
cout << t << string((size_t)(n-1), '0') << '\n';
}
return 0;
}