No.1732 ~Please Check the Samples Carefully!~ Hexadecimal and Octal (2)
Problem Statement
Consider positive integers that have $N$ digits in base $16$ notation and in which no digits other than A,B,C,D,E,F appear.
Here, the digits A ~ F represent ten through fifteen, respectively.
Among such numbers, output, in base $16$ notation, one for which the digits 1,2,3,4,5,6,7 all appear the same number of times in its base $8$ notation.
However, if no number satisfies the condition, output -1.
If multiple numbers satisfy the condition, output any one of them.
You are given $T$ test cases; find the answer for each of them.
Constraints
- $1 \le T \le 200$
- $1 \le N \le 200$
- All input values are integers
Input
The input is given from Standard Input in the following format.$T$
$\mathrm{Case}_1$
$\mathrm{Case}_2$
$\hspace{1em} \vdots$
$\mathrm{Case}_T$
Each test case is given in the following format.
$N$
Output
Output $T$ lines. On the $i$-th line, output the answer for $\mathrm{Case}_i$.
Sample
Sample
Input
3 10 3 21
Output
BBCCCFACAC -1 ACCACCCCCCCCABACAAFFE
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
H20
hamamu
naskya