結果
| 問題 | No.1732 ~サンプルはちゃんと見て!~ 16進数と8進数(2) |
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2024-11-11 17:53:55 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 701 bytes |
| 記録 | |
| コンパイル時間 | 1,041 ms |
| コンパイル使用メモリ | 213,648 KB |
| 実行使用メモリ | 9,184 KB |
| 最終ジャッジ日時 | 2026-07-06 03:49:46 |
| 合計ジャッジ時間 | 2,411 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void fast_io() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
string ans_5 = "ABDCC";
string ans_10 = "BBCCCFACAC";
string ans_21 = "ACCACCCCCCCCABACAAFFE";
void solve() {
int n;
cin >> n;
if (n % 21 == 5) {
cout << ans_5;
for (int i = 0; i < n / 21; i++) {
cout << ans_21;
}
cout << endl;
} else if (n % 21 == 10) {
cout << ans_10;
for (int i = 0; i < n / 21; i++) {
cout << ans_21;
}
cout << endl;
} else if (n % 21 == 0) {
for (int i = 0; i < n / 21; i++) {
cout << ans_21;
}
cout << endl;
} else {
cout << -1 << endl;
}
}
int main() {
fast_io();
int t;
cin >> t;
for (; t--;) {
solve();
}
}
eve__fuyuki