結果

問題 No.52 よくある文字列の問題
ユーザー roarisroaris
提出日時 2020-07-26 00:22:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 285 bytes
コンパイル時間 1,000 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 76,916 KB
最終ジャッジ日時 2023-09-10 02:21:12
合計ジャッジ時間 2,352 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,436 KB
testcase_01 AC 71 ms
71,464 KB
testcase_02 AC 79 ms
76,844 KB
testcase_03 AC 75 ms
71,164 KB
testcase_04 AC 80 ms
76,612 KB
testcase_05 AC 81 ms
76,916 KB
testcase_06 AC 81 ms
76,556 KB
testcase_07 AC 80 ms
76,752 KB
testcase_08 AC 72 ms
71,532 KB
testcase_09 AC 72 ms
71,344 KB
testcase_10 AC 71 ms
71,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
se = set()

for S in range(1<<len(s)):
    now = ""
    l, r = 0, len(s)-1
    
    for i in range(len(s)):
        if (S>>i)&1:
            now += s[l]
            l += 1
        else:
            now += s[r]
            r -= 1
        
    se.add(now)
    
print(len(se))
0