結果
| 問題 |
No.171 スワップ文字列(Med)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-17 20:42:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 234 bytes |
| コンパイル時間 | 352 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-09-15 15:59:03 |
| 合計ジャッジ時間 | 1,600 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 3 |
ソースコード
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)
print(ans%mod-1)