結果

問題 No.986 Present
ユーザー convexineqconvexineq
提出日時 2021-05-06 21:42:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 289 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 80,440 KB
最終ジャッジ日時 2023-10-12 14:16:54
合計ジャッジ時間 4,664 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,160 KB
testcase_01 AC 72 ms
71,360 KB
testcase_02 AC 72 ms
71,392 KB
testcase_03 AC 83 ms
79,000 KB
testcase_04 AC 79 ms
76,580 KB
testcase_05 AC 81 ms
77,940 KB
testcase_06 AC 82 ms
78,300 KB
testcase_07 AC 78 ms
76,116 KB
testcase_08 AC 79 ms
76,872 KB
testcase_09 AC 81 ms
78,920 KB
testcase_10 AC 76 ms
75,780 KB
testcase_11 AC 82 ms
78,804 KB
testcase_12 AC 79 ms
77,440 KB
testcase_13 AC 76 ms
75,944 KB
testcase_14 AC 78 ms
76,020 KB
testcase_15 AC 84 ms
80,440 KB
testcase_16 AC 79 ms
77,956 KB
testcase_17 AC 81 ms
78,712 KB
testcase_18 AC 82 ms
78,996 KB
testcase_19 AC 79 ms
77,860 KB
testcase_20 AC 78 ms
76,028 KB
testcase_21 AC 84 ms
80,332 KB
testcase_22 AC 83 ms
79,864 KB
testcase_23 AC 80 ms
76,960 KB
testcase_24 AC 79 ms
77,180 KB
testcase_25 AC 79 ms
76,552 KB
testcase_26 AC 79 ms
77,192 KB
testcase_27 AC 82 ms
78,220 KB
testcase_28 AC 76 ms
77,272 KB
testcase_29 AC 76 ms
77,040 KB
testcase_30 AC 76 ms
75,940 KB
testcase_31 AC 77 ms
76,900 KB
testcase_32 AC 76 ms
77,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
n,m = map(int,input().split())
p2 = [1]*(m+1)
for i in range(m):
    p2[i+1] = p2[i]*2%MOD
a = pow(2,n,MOD)
b = c = f = 1
for i in range(n):
    b = b*(p2[m]-p2[i])%MOD
    c = c*(p2[n]-p2[i])%MOD
    f = f*(i+1)%MOD
print(a, b*pow(f,MOD-2,MOD)%MOD, b*pow(c,MOD-2,MOD)%MOD)
0