結果
| 問題 | No.170 スワップ文字列(Easy) | 
| コンテスト | |
| ユーザー |  あかりき | 
| 提出日時 | 2021-03-01 18:54:04 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 45 ms / 5,000 ms | 
| コード長 | 216 bytes | 
| コンパイル時間 | 159 ms | 
| コンパイル使用メモリ | 82,096 KB | 
| 実行使用メモリ | 54,016 KB | 
| 最終ジャッジ日時 | 2024-10-03 00:56:08 | 
| 合計ジャッジ時間 | 2,088 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
import collections s=list(input()) c=collections.Counter(s) l=list(c.values()) fact=[1,1] for i in range(2,len(s)+1): fact.append(fact[-1]*i) ans=fact[len(s)] for i in range(len(l)): ans//=fact[l[i]] print(ans-1)
