問題一覧 > 通常問題

No.1732 ~Please Check the Samples Carefully!~ Hexadecimal and Octal (2)

レベル : / AI推定難易度 : 1700 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 34
作問者 : H20 / テスター : 👑 hamamu naskya
お気に入りにしたユーザー ProblemId : 7137 / 自分の提出
問題文最終更新日: 2022-02-13 01:47:10
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 321 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。