結果
| 問題 | No.52 よくある文字列の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-03 22:32:37 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 21 ms / 5,000 ms |
| + 605µs | |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 408 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-10-07 11:15:17 |
| 合計ジャッジ時間 | 1,536 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
# http://chiwawa-star.hatenablog.com/entry/2017/07/12/194636
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################
S = input().rstrip()
ptn = set()
def dfs(s, t):
# print(s, t)
if len(s) == 0:
ptn.add(t)
return
dfs(s[1:], t+s[0])
dfs(s[0:-1], t+s[-1])
return
dfs(S, '')
print(len(ptn))