結果

問題 No.52 よくある文字列の問題
ユーザー syunsukesyunsuke
提出日時 2020-09-19 11:43:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 751 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 8,020 KB
最終ジャッジ日時 2023-09-05 13:35:35
合計ジャッジ時間 1,037 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,928 KB
testcase_01 AC 16 ms
7,772 KB
testcase_02 AC 15 ms
7,952 KB
testcase_03 AC 16 ms
7,920 KB
testcase_04 AC 17 ms
8,020 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 15 ms
7,748 KB
testcase_09 AC 16 ms
7,748 KB
testcase_10 AC 15 ms
7,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
D=[{}for i in range(len(S)+1)]
D[0][""]=S
#print(D)
for i in range(1,len(S)+1):
    for k,v in D[i-1].items():
        #D[i][v[0]+k]=v[1:]
        D[i][k+v[0]]=v[1:]
        #D[i][v[-1]+k]=v[:len(v)-1]
        D[i][k+v[-1]]=v[:len(v)-1]
print(len(D[-1]))
0