結果
問題 | No.52 よくある文字列の問題 |
ユーザー | ゆるく |
提出日時 | 2014-10-29 00:13:08 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 106 ms |
コンパイル使用メモリ | 10,668 KB |
実行使用メモリ | 98,880 KB |
最終ジャッジ日時 | 2023-08-28 22:56:26 |
合計ジャッジ時間 | 2,868 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 32 ms
9,956 KB |
testcase_01 | AC | 30 ms
9,908 KB |
testcase_02 | AC | 335 ms
10,008 KB |
testcase_03 | AC | 31 ms
9,868 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 30 ms
9,912 KB |
testcase_10 | WA | - |
ソースコード
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))