結果
問題 |
No.52 よくある文字列の問題
|
ユーザー |
![]() |
提出日時 | 2014-10-29 00:13:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 100,348 KB |
最終ジャッジ日時 | 2024-12-30 13:27:34 |
合計ジャッジ時間 | 3,439 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 6 |
ソースコード
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() a = s1.pop() b = s2.pop() d = defaultdict(dict) for ss in itertools.permutations(s1): d[("".join(ss) + a)] = 1 for ss in itertools.permutations(s2): d[("".join(ss) + b)] = 1 print(len(d))