結果
| 問題 |
No.1732 ~サンプルはちゃんと見て!~ 16進数と8進数(2)
|
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2024-11-11 17:53:55 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 701 bytes |
| コンパイル時間 | 2,156 ms |
| コンパイル使用メモリ | 194,552 KB |
| 最終ジャッジ日時 | 2025-02-25 03:55:45 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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