結果

問題 No.52 よくある文字列の問題
コンテスト
ユーザー tookunn_1213
提出日時 2015-09-21 23:08:25
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 351 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 165 ms
コンパイル使用メモリ 77,400 KB
最終ジャッジ日時 2025-12-03 17:11:00
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def dfs(strSet,S,start,end,nowStr):
	if start == end:return nowStr
	strSet.add(S[start] + dfs(strSet,S,start + 1,end, S[start] + nowStr))
	strSet.add(S[end] + dfs(strSet,S,start,end - 1,S[end] + nowStr))
	return nowStr
S = raw_input()
strSet = set([])
dfs(strSet,S,0,len(S) - 1,'')
count = 0
for i in strSet:
	if len(i) == len(S):count+= 1
print count
0