結果

問題 No.501 穴と文字列
ユーザー やまじゅんやまじゅん
提出日時 2017-06-23 11:22:32
言語 C
(gcc 12.3.0)
結果
MLE  
(最新)
OLE  
(最初)
実行時間 -
コード長 344 bytes
コンパイル時間 361 ms
コンパイル使用メモリ 29,312 KB
実行使用メモリ 793,088 KB
最終ジャッジ日時 2024-04-14 06:52:01
合計ジャッジ時間 4,118 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
13,760 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 MLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int print(char c,int times) {
	printf("%c",c);
	times != 1 && print(c,--times);
	return 0;
}

int main(void)
{
	int num, hole;
	scanf("%d%d", &num, &hole);

	if (num >= hole) {
		print('A',hole);
		print('C',num - hole);
	}
	if (num < hole) {
		print('A',2*num-hole);
		print('B',hole - num);
	}

	printf("\n");
	return 0;
}
0