結果

問題 No.52 よくある文字列の問題
ユーザー zombietanzombietan
提出日時 2016-05-12 18:07:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 198 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 11,800 KB
実行使用メモリ 10,012 KB
最終ジャッジ日時 2023-10-22 04:04:28
合計ジャッジ時間 918 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,952 KB
testcase_01 AC 26 ms
9,952 KB
testcase_02 AC 25 ms
9,952 KB
testcase_03 AC 26 ms
9,952 KB
testcase_04 AC 26 ms
10,012 KB
testcase_05 AC 25 ms
9,952 KB
testcase_06 AC 26 ms
10,004 KB
testcase_07 AC 25 ms
9,960 KB
testcase_08 AC 25 ms
9,952 KB
testcase_09 AC 24 ms
9,952 KB
testcase_10 AC 24 ms
9,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
r = set()

def rec(s, c=""):
    if len(s) == 0:
        r.add(c)
        return
    rec(s[1:], c+s[0])
    rec(s[:-1], c+s[-1])

if __name__ == '__main__':
    rec(S)
    print(len(r))
0