結果
問題 |
No.2299 Antitypoglycemia
|
ユーザー |
![]() |
提出日時 | 2023-03-13 12:38:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 419 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 59,520 KB |
最終ジャッジ日時 | 2024-09-18 07:29:52 |
合計ジャッジ時間 | 2,586 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 1 WA * 24 |
ソースコード
n, a, b = 3, 1, 1 M = 2 * 10**5 + 10 facs = [1] * M mod = 998244353 for i in range(1, M): facs[i] = facs[i - 1] * i facs[i] %= mod if a != b: res = facs[n - 1] + (n - 2) * (n - 2) * facs[n - 2] else: res = (n - 1) * (n - 2) * facs[n - 2] res %= mod print(res)