結果

問題 No.52 よくある文字列の問題
コンテスト
ユーザー ゆるく
提出日時 2014-10-28 23:53:46
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 393 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 547 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 150,768 KB
最終ジャッジ日時 2026-10-09 15:53:12
合計ジャッジ時間 2,296 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy

s = str(input())
s1 = list(s)
s2 = list(s)
s2.reverse()
s1.pop()
s2.pop()

a = set(itertools.permutations(s1))
b = set(itertools.permutations(s2))
print(1 if a == b else len(a) + len(b))
0