結果

問題 No.170 スワップ文字列(Easy)
ユーザー mlihua09
提出日時 2020-08-28 17:41:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 55,772 KB
最終ジャッジ日時 2024-11-13 23:30:11
合計ジャッジ時間 2,351 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #


from collections import defaultdict

X = defaultdict(int)

for s in input():
    
    X[s] += 1
    
X = X.values()

n = sum(X)

F = [1, 1, 2, 6, 24, 120, 720, 5040, 40320]

ans = F[n]

for i in X:
    
    ans //= F[i]
    
print(ans - 1)
0