結果

問題 No.2141 Enumeratest
ユーザー first_vilfirst_vil
提出日時 2022-12-03 17:13:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 982 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 506 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 69,760 KB
最終ジャッジ日時 2024-04-19 03:05:05
合計ジャッジ時間 16,559 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,584 KB
testcase_01 AC 41 ms
51,968 KB
testcase_02 AC 87 ms
64,000 KB
testcase_03 AC 57 ms
65,280 KB
testcase_04 AC 982 ms
67,712 KB
testcase_05 AC 943 ms
59,392 KB
testcase_06 AC 40 ms
51,840 KB
testcase_07 AC 47 ms
58,112 KB
testcase_08 AC 50 ms
60,672 KB
testcase_09 AC 48 ms
59,648 KB
testcase_10 AC 51 ms
62,080 KB
testcase_11 AC 56 ms
64,640 KB
testcase_12 AC 43 ms
57,728 KB
testcase_13 AC 47 ms
59,136 KB
testcase_14 AC 55 ms
64,768 KB
testcase_15 AC 52 ms
61,824 KB
testcase_16 AC 53 ms
62,976 KB
testcase_17 AC 637 ms
66,816 KB
testcase_18 AC 787 ms
64,384 KB
testcase_19 AC 855 ms
67,968 KB
testcase_20 AC 705 ms
65,536 KB
testcase_21 AC 784 ms
65,408 KB
testcase_22 AC 586 ms
64,128 KB
testcase_23 AC 306 ms
64,512 KB
testcase_24 AC 245 ms
69,760 KB
testcase_25 AC 66 ms
64,896 KB
testcase_26 AC 895 ms
62,592 KB
testcase_27 AC 762 ms
64,768 KB
testcase_28 AC 938 ms
64,768 KB
testcase_29 AC 532 ms
63,488 KB
testcase_30 AC 877 ms
67,712 KB
testcase_31 AC 642 ms
65,792 KB
testcase_32 AC 687 ms
67,456 KB
testcase_33 AC 586 ms
65,280 KB
testcase_34 AC 564 ms
68,480 KB
testcase_35 AC 102 ms
62,592 KB
testcase_36 AC 892 ms
64,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod=998244353
n,m=map(int,input().split())
fac=[1]*(m+1)
for i in range(1,m+1):
    fac[i]=fac[i-1]*i%mod
ans=fac[m]
for i in range(n):
    a=m//n+(m%n>i)
    ans=ans*pow(fac[a],mod-2,mod)%mod
print(ans)
0