結果
| 問題 | No.171 スワップ文字列(Med) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-17 20:42:47 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 27 ms / 1,000 ms |
| + 347µs | |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-10-14 00:13:14 |
| 合計ジャッジ時間 | 2,099 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
S = input()
mod = 573
lengS = len(S)
import math
from collections import defaultdict
dict = defaultdict(int)
for s in S:
dict[s]+=1
ans = math.factorial(lengS)
for v in dict.values():
ans//=math.factorial(v)
ans-=1
print(ans%mod)