結果
問題 |
No.170 スワップ文字列(Easy)
|
ユーザー |
![]() |
提出日時 | 2025-03-20 18:43:56 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 5,000 ms |
コード長 | 204 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 82,084 KB |
実行使用メモリ | 55,768 KB |
最終ジャッジ日時 | 2025-03-20 18:43:58 |
合計ジャッジ時間 | 1,925 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
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)