結果
問題 | No.52 よくある文字列の問題 |
ユーザー |
|
提出日時 | 2023-03-09 00:26:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 57 ms / 5,000 ms |
コード長 | 210 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 82,292 KB |
実行使用メモリ | 59,776 KB |
最終ジャッジ日時 | 2024-09-18 02:40:46 |
合計ジャッジ時間 | 1,344 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
s = input() ans = set() L = [('', s)] while L: res, s = L.pop() if s == '': ans.add(res) else: L.append((res + s[0], s[1:])) L.append((res + s[-1], s[:-1])) print(len(ans))