結果

問題 No.2299 Antitypoglycemia
ユーザー とろちゃとろちゃ
提出日時 2023-05-12 21:39:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,159 ms / 2,000 ms
コード長 732 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 116,736 KB
最終ジャッジ日時 2024-05-06 11:22:59
合計ジャッジ時間 11,578 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
51,584 KB
testcase_01 AC 38 ms
52,352 KB
testcase_02 AC 38 ms
52,096 KB
testcase_03 AC 537 ms
90,496 KB
testcase_04 AC 519 ms
89,520 KB
testcase_05 AC 275 ms
81,280 KB
testcase_06 AC 518 ms
90,624 KB
testcase_07 AC 89 ms
75,264 KB
testcase_08 AC 487 ms
87,936 KB
testcase_09 AC 550 ms
91,252 KB
testcase_10 AC 144 ms
77,184 KB
testcase_11 AC 161 ms
77,056 KB
testcase_12 AC 668 ms
95,360 KB
testcase_13 AC 1,090 ms
113,792 KB
testcase_14 AC 73 ms
74,880 KB
testcase_15 AC 66 ms
74,816 KB
testcase_16 AC 174 ms
77,568 KB
testcase_17 AC 106 ms
74,880 KB
testcase_18 AC 766 ms
102,784 KB
testcase_19 AC 794 ms
102,784 KB
testcase_20 AC 1,159 ms
116,736 KB
testcase_21 AC 1,136 ms
116,224 KB
testcase_22 AC 781 ms
102,528 KB
testcase_23 AC 36 ms
51,456 KB
testcase_24 AC 36 ms
52,096 KB
testcase_25 AC 36 ms
51,840 KB
testcase_26 AC 36 ms
51,456 KB
testcase_27 AC 36 ms
51,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")
# from bisect import *
# from collections import *
# from heapq import *
# from itertools import *
from math import *

# from datetime import *
# from decimal import*
# from string import ascii_lowercase,ascii_uppercase
# import numpy as np
import sys
import os

# sys.setrecursionlimit(10**6)
INF = 10**18
MOD = 998244353
# MOD = 10**9 + 7
File = open("input.txt", "r") if os.path.exists("input.txt") else sys.stdin


def input():
    return File.readline()[:-1]


# ///////////////////////////////////////////////////////////////////////////


N, A, B = map(int, input().split())
p = perm(N)
p2 = perm(N - 1) * 2
if A != B:
    p2 -= perm(N - 2)
print((p - p2) % MOD)
0