結果

問題 No.501 穴と文字列
ユーザー convexineqconvexineq
提出日時 2021-02-18 09:39:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 1,789 ms
コンパイル使用メモリ 86,816 KB
実行使用メモリ 78,596 KB
最終ジャッジ日時 2023-10-12 18:34:54
合計ジャッジ時間 3,419 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
77,744 KB
testcase_01 AC 85 ms
77,904 KB
testcase_02 AC 76 ms
71,156 KB
testcase_03 AC 75 ms
71,364 KB
testcase_04 AC 74 ms
71,128 KB
testcase_05 AC 74 ms
71,344 KB
testcase_06 AC 75 ms
71,204 KB
testcase_07 AC 74 ms
71,180 KB
testcase_08 AC 74 ms
71,464 KB
testcase_09 AC 74 ms
71,464 KB
testcase_10 AC 74 ms
71,416 KB
testcase_11 AC 75 ms
71,340 KB
testcase_12 AC 74 ms
71,408 KB
testcase_13 AC 73 ms
71,124 KB
testcase_14 AC 74 ms
71,360 KB
testcase_15 AC 75 ms
71,340 KB
testcase_16 AC 73 ms
71,420 KB
testcase_17 AC 73 ms
71,272 KB
testcase_18 AC 79 ms
78,076 KB
testcase_19 AC 78 ms
78,068 KB
testcase_20 AC 82 ms
78,188 KB
testcase_21 AC 82 ms
78,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d = map(int,input().split())
ans = []
for _ in range(n):
    if 2*n == d:
        d -= 2
        ans.append("B")
    elif d == 0:
        ans.append("C")
    else:
        d -= 1
        ans.append("A")
    n -= 1
print("".join(ans))
0