結果

問題 No.501 穴と文字列
ユーザー brthyyjp
提出日時 2021-09-05 13:53:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
MLE  
実行時間 -
コード長 186 bytes
コンパイル時間 630 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 818,048 KB
最終ジャッジ日時 2024-12-21 18:04:57
合計ジャッジ時間 5,748 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 MLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d = map(int, input().split())
S = []
for z in range(n+1):
    x = n-d+z
    y = d-2*z
    if x >= 0 and y >= 0:
        s = 'A'*y+'B'*z+'C'*x
        S.append(s)
S.sort()
print(S[0])
0