結果

問題 No.170 スワップ文字列(Easy)
ユーザー lllllll88938494
提出日時 2023-06-03 20:41:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 5,000 ms
コード長 204 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 55,508 KB
最終ジャッジ日時 2024-12-29 03:14:42
合計ジャッジ時間 2,222 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
from math import factorial as f
s=input()
dic=defaultdict(int)
for i in s:
    dic[i] += 1

a = f(len(s))
b = 1
for i in set(list(s)):
    b*=f(dic[i])

print(a//b - 1)
0