結果
| 問題 | No.501 穴と文字列 |
| コンテスト | |
| ユーザー |
notetonous
|
| 提出日時 | 2017-08-03 16:47:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 302 bytes |
| コンパイル時間 | 423 ms |
| コンパイル使用メモリ | 55,164 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-14 16:42:11 |
| 合計ジャッジ時間 | 1,149 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
int N,D;
string s;
cin >> N >> D;
if(D<=N){
for(int i=0;i<D;i++)s+='A';
for(int i=D;i<N;i++)s+='C';
}
else{
for(int i=0;i<2*N-D;i++)s+='A';
for(int i=2*N-D;i<N;i++)s+='B';
}
cout << s;
return 0;
}
notetonous