結果

問題 No.501 穴と文字列
ユーザー ohreitetsu
提出日時 2017-11-20 15:15:11
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 54,004 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-14 16:45:19
合計ジャッジ時間 1,317 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;i++){
			cout<<'A';
		}
		for (i=0;i<D-N;i++){
			cout<<'B';
		}
		cout<<endl;
	}
	return 0;
}
0