結果
問題 | No.501 穴と文字列 |
ユーザー |
![]() |
提出日時 | 2017-10-24 21:49:10 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 1,282 ms |
コンパイル使用メモリ | 157,924 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-14 16:45:18 |
合計ジャッジ時間 | 1,931 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(void) {int N,D;cin >> N >> D;bool f = N - D < 0;int ch = abs(N - D);for (int i=0; i<N-ch; i++) cout << 'A';if (f) for (int i=N-ch; i<N; i++) cout << 'B';else for (int i=N-ch; i<N; i++) cout << 'C';cout << endl;return 0;}