結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 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', hole);
	}
	if (num < hole) {
		print('A',2*num-hole);
		print('B',hole - num);
	}

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