codeforces #324 div 2 A. Olesya and Rodion

A. Olesya and Rodion
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them.

Your task is: given the n and t print an integer strictly larger than zero consisting of n digits that is divisible by t. If such number doesn’t exist, print  - 1.

Input

The single line contains two numbers, n and t (1 ≤ n ≤ 100, 2 ≤ t ≤ 10) — the length of the number and the number it should be divisible by.

Output

Print one such positive number without leading zeroes, — the answer to the problem, or  - 1, if such number doesn’t exist. If there are multiple possible answers, you are allowed to print any of them.

Sample test(s)
input

output

 

构造题.

让构造任意一个n位数满足整除t

由于t是个位数== 

所以很水.

-1的话只有n为1t为10的情况.

具体见代码...写得有点丑QAQ

View Code

 

作者: CrazyKK

ex-ACMer@hust,researcher@sensetime

说点什么

您将是第一位评论人!

提醒
wpDiscuz