307237: CF1326A. Bad Ugly Numbers
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Bad Ugly Numbers
题意翻译
构造一个 $n$ 位十进制数,保证不被该数的任意一位整除。 $1\leq n\leq 100000$题目描述
You are given a integer $ n $ ( $ n > 0 $ ). Find any integer $ s $ which satisfies these conditions, or report that there are no such numbers: In the decimal representation of $ s $ : - $ s > 0 $ , - $ s $ consists of $ n $ digits, - no digit in $ s $ equals $ 0 $ , - $ s $ is not divisible by any of it's digits.输入输出格式
输入格式
The input consists of multiple test cases. The first line of the input contains a single integer $ t $ ( $ 1 \leq t \leq 400 $ ), the number of test cases. The next $ t $ lines each describe a test case. Each test case contains one positive integer $ n $ ( $ 1 \leq n \leq 10^5 $ ). It is guaranteed that the sum of $ n $ for all test cases does not exceed $ 10^5 $ .
输出格式
For each test case, print an integer $ s $ which satisfies the conditions described above, or "-1" (without quotes), if no such number exists. If there are multiple possible solutions for $ s $ , print any solution.
输入输出样例
输入样例 #1
4
1
2
3
4
输出样例 #1
-1
57
239
6789