結果

問題 No.52 よくある文字列の問題
ユーザー JunOnumaJunOnuma
提出日時 2017-06-14 16:54:25
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 246 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 7,124 KB
実行使用メモリ 6,520 KB
最終ジャッジ日時 2023-10-22 04:08:16
合計ジャッジ時間 914 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
6,420 KB
testcase_01 AC 10 ms
6,420 KB
testcase_02 AC 10 ms
6,424 KB
testcase_03 AC 9 ms
6,420 KB
testcase_04 AC 10 ms
6,520 KB
testcase_05 AC 10 ms
6,432 KB
testcase_06 AC 11 ms
6,496 KB
testcase_07 AC 10 ms
6,440 KB
testcase_08 AC 10 ms
6,424 KB
testcase_09 AC 10 ms
6,420 KB
testcase_10 AC 10 ms
6,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def func(s):
    if len(s) == 1:
        return {s}
    else:
        t = func(s[1:])
        u = { s[0] + x for x in t }
        v = func(s[:-1])
        w = { s[-1] + x for x in v }
        return u.union(w)

s = raw_input()
print len(func(s))
0