結果

問題 No.2141 Enumeratest
ユーザー titiatitia
提出日時 2022-12-02 21:48:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,510 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 175,344 KB
最終ジャッジ日時 2024-04-18 05:43:22
合計ジャッジ時間 49,593 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,172 ms
167,552 KB
testcase_01 AC 1,151 ms
167,552 KB
testcase_02 AC 1,173 ms
167,808 KB
testcase_03 AC 1,178 ms
167,552 KB
testcase_04 AC 1,363 ms
175,344 KB
testcase_05 AC 1,365 ms
175,344 KB
testcase_06 AC 1,149 ms
167,552 KB
testcase_07 AC 1,203 ms
167,552 KB
testcase_08 AC 1,162 ms
167,552 KB
testcase_09 AC 1,146 ms
167,680 KB
testcase_10 AC 1,175 ms
167,552 KB
testcase_11 AC 1,182 ms
167,552 KB
testcase_12 AC 1,152 ms
167,552 KB
testcase_13 AC 1,182 ms
167,552 KB
testcase_14 AC 1,161 ms
167,552 KB
testcase_15 AC 1,159 ms
167,552 KB
testcase_16 AC 1,213 ms
167,552 KB
testcase_17 AC 1,386 ms
172,592 KB
testcase_18 AC 1,381 ms
173,928 KB
testcase_19 AC 1,435 ms
174,444 KB
testcase_20 AC 1,410 ms
173,052 KB
testcase_21 AC 1,435 ms
173,796 KB
testcase_22 AC 1,311 ms
172,148 KB
testcase_23 AC 1,242 ms
169,728 KB
testcase_24 AC 1,289 ms
169,088 KB
testcase_25 AC 1,184 ms
167,552 KB
testcase_26 AC 1,344 ms
174,820 KB
testcase_27 AC 1,346 ms
173,588 KB
testcase_28 AC 1,510 ms
175,240 KB
testcase_29 AC 1,264 ms
171,660 KB
testcase_30 AC 1,402 ms
174,608 KB
testcase_31 AC 1,375 ms
172,352 KB
testcase_32 AC 1,359 ms
173,112 KB
testcase_33 AC 1,316 ms
172,088 KB
testcase_34 AC 1,365 ms
171,788 KB
testcase_35 AC 1,178 ms
167,936 KB
testcase_36 AC 1,428 ms
174,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
mod=998244353

FACT=[1]
for i in range(1,2*10**6+1):
    FACT.append(FACT[-1]*i%mod)

FACT_INV=[pow(FACT[-1],mod-2,mod)]
for i in range(2*10**6,0,-1):
    FACT_INV.append(FACT_INV[-1]*i%mod)

FACT_INV.reverse()

q=M//N
r=M%N
ANS=[q]*N
for i in range(r):
    ANS[i]+=1

L=FACT[M]
for ans in ANS:
    L=L*FACT_INV[ans]%mod

print(L)
0