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