結果

問題 No.501 穴と文字列
ユーザー ndifix
提出日時 2017-04-07 23:02:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 56,592 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-16 02:53:17
合計ジャッジ時間 1,116 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
int main(){
	int n, d;
	cin >> n >> d;
	string s;
	for(int i=0; i<2*n-d && d>i; i++){ s += 'A'; }
	for(int i=0; i<n-s.size() && d>i; i++){ s += 'B'; }
	for(int i=0; i<n-s.size() ; i++){ s += 'C'; }

	cout << s << endl;
	return 0;
}
0