結果

問題 No.501 穴と文字列
ユーザー 👑 yumechiyumechi
提出日時 2017-04-07 23:55:18
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 560 ms
コンパイル使用メモリ 87,116 KB
実行使用メモリ 71,632 KB
最終ジャッジ日時 2023-08-21 07:13:21
合計ジャッジ時間 2,810 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,316 KB
testcase_01 AC 69 ms
71,432 KB
testcase_02 AC 69 ms
71,356 KB
testcase_03 AC 68 ms
71,632 KB
testcase_04 AC 69 ms
71,424 KB
testcase_05 AC 69 ms
71,332 KB
testcase_06 AC 71 ms
71,236 KB
testcase_07 AC 69 ms
71,360 KB
testcase_08 AC 69 ms
71,424 KB
testcase_09 AC 69 ms
71,456 KB
testcase_10 AC 69 ms
71,392 KB
testcase_11 AC 70 ms
71,104 KB
testcase_12 AC 68 ms
71,456 KB
testcase_13 AC 68 ms
71,232 KB
testcase_14 AC 67 ms
71,156 KB
testcase_15 AC 67 ms
71,236 KB
testcase_16 AC 69 ms
71,304 KB
testcase_17 AC 69 ms
71,160 KB
testcase_18 AC 70 ms
71,524 KB
testcase_19 AC 67 ms
71,320 KB
testcase_20 AC 70 ms
71,400 KB
testcase_21 AC 69 ms
71,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n, d = map(int, input().split())
    if d == 0:
        print("C" * n)
    elif n >= d:
        print("A" * d + "C" * (n - d))
    else:
        print("A" * (n - (d - n)) + "B" * (d - n))

if __name__=="__main__":
    solve()
0