結果

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

ソースコード

diff #

import math
from collections import Counter

s = input().strip()
count = Counter(s)
n = len(s)
total = math.factorial(n)
for c in count.values():
    total //= math.factorial(c)
ans = total - 1
print(ans)
0