結果
| 問題 |
No.171 スワップ文字列(Med)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-08-22 13:01:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 326 bytes |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 800,928 KB |
| 最終ジャッジ日時 | 2024-07-18 12:43:58 |
| 合計ジャッジ時間 | 2,599 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 2 MLE * 1 -- * 7 |
ソースコード
import itertools
S = input()
dic = dict()
for c in S:
if c not in dic:
dic.update({c:1})
else:
dic[c] += 1
length = len(S)
res = 1
vs = [i for i in dic.values()]
vs.sort()
vs = vs[::-1]
for i in vs:
res *= len(list(itertools.combinations(range(length), i)))
length -= i
print((res-1) % 573)