結果
| 問題 | No.52 よくある文字列の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-03 10:14:40 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 98 ms / 5,000 ms |
| コード長 | 351 bytes |
| 記録 | |
| コンパイル時間 | 375 ms |
| コンパイル使用メモリ | 20,348 KB |
| 実行使用メモリ | 15,232 KB |
| 最終ジャッジ日時 | 2026-04-04 00:09:56 |
| 合計ジャッジ時間 | 2,030 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge5_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
from itertools import product
S = list(input())
ans = set()
for i in product((0, 1), repeat=len(S)):
tmp = []
l, r = 0, len(S) - 1
for j in i:
if j:
tmp.append(S[l])
l += 1
else:
tmp.append(S[r])
r -= 1
ans.add("".join(map(str, tmp)))
print(len(ans))