結果
問題 | No.52 よくある文字列の問題 |
ユーザー |
|
提出日時 | 2015-07-30 09:42:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 382 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-22 05:22:26 |
合計ジャッジ時間 | 1,244 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
S = input() T = [('', 0, -1)] for i in range(len(S)): newT = [] for t, head, tail in T: newT.append((t + S[head], head + 1, tail)) newT.append((t + S[tail], head, tail - 1)) T = newT uniqT = set([t for t, head, tail in T]) print(len(uniqT))