結果
問題 |
No.501 穴と文字列
|
ユーザー |
![]() |
提出日時 | 2025-06-21 12:32:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 475 bytes |
コンパイル時間 | 1,566 ms |
コンパイル使用メモリ | 162,652 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-21 12:32:38 |
合計ジャッジ時間 | 2,774 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define int ll signed main(){ int n, d; cin >> n >> d; if (!d)for (int i = 0; i < n; i++)cout << 'C'; else if(d>=n){ for (int i = 0; i < 2*n-d; i++) { cout << 'A'; } for (int i = 2*n-d; i < n; i++)cout << 'B'; } else { for (int i = 0; i < d; i++) { cout << 'A'; } for (int i = d; i < n; i++)cout << 'C'; } }