結果

問題 No.52 よくある文字列の問題
ユーザー ゆるくゆるく
提出日時 2014-10-28 23:53:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 137,760 KB
最終ジャッジ日時 2023-08-28 22:52:30
合計ジャッジ時間 2,599 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
9,852 KB
testcase_01 AC 30 ms
9,840 KB
testcase_02 AC 123 ms
10,052 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 29 ms
9,868 KB
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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