結果
問題 | No.501 穴と文字列 |
ユーザー |
|
提出日時 | 2017-04-07 22:45:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 309 bytes |
コンパイル時間 | 637 ms |
コンパイル使用メモリ | 68,084 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 16:21:06 |
合計ジャッジ時間 | 1,502 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream>#include <algorithm>#include <utility>#include <string>using namespace std;int main() {int n, d;cin >> n >> d;string s;if (d <= n) {s = string(d, 'A') + string(n - d, 'C');} else {s = string(2 * n - d, 'A') + string(d - n, 'B');}cout << s << endl;return 0;}