結果
| 問題 |
No.501 穴と文字列
|
| ユーザー |
|
| 提出日時 | 2017-11-20 15:12:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 374 bytes |
| コンパイル時間 | 476 ms |
| コンパイル使用メモリ | 54,156 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-26 03:20:32 |
| 合計ジャッジ時間 | 1,256 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 7 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
int N,D;
cin>>N>>D;
int i;
if (D<=N){
for (i=0;i<D;i++){
cout<<'A';
}
for (i=D;i<N;i++){
cout<<'C';
}
cout<<endl;
return 0;
}else{
int x=D-N;
for (i=0;i<N-x-1;i++){
cout<<'A';
}
for (i=0;i<D-N;i++){
cout<<'B';
}
cout<<endl;
}
return 0;
}