結果

問題 No.1732 ~サンプルはちゃんと見て!~ 16進数と8進数(2)
ユーザー SSRSSSRS
提出日時 2021-11-05 21:42:49
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 474 bytes
コンパイル時間 1,602 ms
コンパイル使用メモリ 164,456 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-24 05:29:13
合計ジャッジ時間 2,182 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
5,376 KB
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int T;
  cin >> T;
  for (int i = 0; i < T; i++){
    int N;
    cin >> N;
    int D = (N * 4 + 2) / 3;
    if (D % 7 != 0){
      cout << -1 << endl;
    } else {
      D /= 7;
      if (D % 3 == 1){
        cout << "ABDCC";
      }
      if (D % 3 == 2){
        cout << "BBCCCFACAC";
      }
      for (int j = 0; j < D / 3; j++){
        cout << "ACCACCCCCCCCABACAAFFE";
      }
      cout << endl;
    }
  }
}
0