結果
問題 | No.501 穴と文字列 |
ユーザー |
|
提出日時 | 2017-04-07 22:51:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 548 ms |
コンパイル使用メモリ | 64,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 16:23:15 |
合計ジャッジ時間 | 1,175 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream>#include <cstdio>using namespace std;signed main(){int n,d;char c[] = {'C','A','B'};cin >> n >> d;if(d <= n){for(int i = 0;i < d;i++) cout << 'A';for(int i = d;i < n;i++) cout << 'C';}else{for(int i = 0;i < 2 * n - d;i++) cout << 'A';for(int i = 2 * n - d;i < n;i++) cout << 'B';}cout << endl;return 0;}