結果
| 問題 |
No.52 よくある文字列の問題
|
| コンテスト | |
| ユーザー |
ゆるく
|
| 提出日時 | 2014-10-29 00:10:59 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 460 bytes |
| コンパイル時間 | 412 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 100,608 KB |
| 最終ジャッジ日時 | 2024-12-30 13:27:11 |
| 合計ジャッジ時間 | 3,913 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[(a + "".join(ss))] = 1
for ss in itertools.permutations(s2):
d[(b + "".join(ss))] = 1
print(len(d))
ゆるく