結果
| 問題 | No.52 よくある文字列の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-27 23:20:45 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 98 ms / 5,000 ms |
| + 512µs | |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 314 ms |
| コンパイル使用メモリ | 21,340 KB |
| 実行使用メモリ | 15,788 KB |
| 最終ジャッジ日時 | 2026-09-03 16:24:58 |
| 合計ジャッジ時間 | 3,158 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
# A = [ int(input()) for _ in range(N) ]
##############################
S = list(input().rstrip())
ret = {}
def dfs(S, t):
# print(S, t)
if S == []:
ret[t] = True
return
dfs(S[1:], t+S[0])
dfs(S[:-1], t+S[-1])
dfs(S, '')
print(len(ret))