結果
問題 | No.171 スワップ文字列(Med) |
ユーザー |
|
提出日時 | 2022-05-17 20:42:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 1,000 ms |
コード長 | 238 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-15 15:59:25 |
合計ジャッジ時間 | 1,133 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
S = input()mod = 573lengS = len(S)import mathfrom collections import defaultdictdict = defaultdict(int)for s in S:dict[s]+=1ans = math.factorial(lengS)for v in dict.values():ans//=math.factorial(v)ans-=1print(ans%mod)