結果

問題 No.52 よくある文字列の問題
ユーザー yozayoza
提出日時 2014-10-31 02:35:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 7,988 KB
最終ジャッジ日時 2023-08-28 23:36:19
合計ジャッジ時間 887 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,916 KB
testcase_01 AC 14 ms
7,772 KB
testcase_02 AC 15 ms
7,988 KB
testcase_03 AC 14 ms
7,804 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 13 ms
7,912 KB
testcase_09 AC 13 ms
7,956 KB
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()

s_len = len(s)
result_set = set()

for i in range(s_len + 1):
    tmp = ""
    left = 0
    right = s_len - 1
    for j in range(s_len):
        if i & (2 ** j):
            tmp += s[right]
            right -= 1
        else:
            tmp += s[left]
            left += 1
    result_set.add(tmp)
print(len(result_set))
0