結果

問題 No.986 Present
ユーザー chielochielo
提出日時 2020-02-12 12:03:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 456 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 82,188 KB
実行使用メモリ 76,244 KB
最終ジャッジ日時 2024-04-14 09:05:11
合計ジャッジ時間 6,925 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
55,828 KB
testcase_01 AC 44 ms
56,252 KB
testcase_02 AC 45 ms
56,080 KB
testcase_03 AC 249 ms
76,004 KB
testcase_04 AC 62 ms
65,672 KB
testcase_05 AC 219 ms
75,768 KB
testcase_06 AC 143 ms
72,836 KB
testcase_07 AC 58 ms
65,368 KB
testcase_08 AC 118 ms
70,028 KB
testcase_09 AC 274 ms
75,800 KB
testcase_10 AC 43 ms
55,236 KB
testcase_11 AC 198 ms
76,076 KB
testcase_12 AC 184 ms
76,244 KB
testcase_13 AC 54 ms
63,656 KB
testcase_14 AC 70 ms
66,536 KB
testcase_15 AC 391 ms
75,820 KB
testcase_16 AC 68 ms
64,972 KB
testcase_17 AC 306 ms
75,840 KB
testcase_18 AC 198 ms
75,888 KB
testcase_19 AC 122 ms
71,048 KB
testcase_20 AC 54 ms
63,960 KB
testcase_21 AC 409 ms
75,676 KB
testcase_22 AC 321 ms
75,952 KB
testcase_23 AC 169 ms
76,172 KB
testcase_24 AC 447 ms
76,032 KB
testcase_25 AC 111 ms
70,444 KB
testcase_26 AC 456 ms
76,032 KB
testcase_27 AC 304 ms
75,956 KB
testcase_28 AC 44 ms
55,948 KB
testcase_29 AC 44 ms
55,852 KB
testcase_30 AC 44 ms
56,564 KB
testcase_31 AC 45 ms
54,920 KB
testcase_32 AC 44 ms
55,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import reduce
n, m = map(int, input().split())
mo = 998244353
f = lambda m, n: reduce(lambda x, y: x * y % mo, ((pow(2, m, mo) - pow(2, i, mo)) for i in range(n)))
fact = lambda n: reduce(lambda x, y: x * y % mo, range(1, n + 1))
rev = lambda x: pow(x, mo - 2, mo)
print(pow(2, n, mo), f(m, n) * rev(fact(n)) % mo, f(m, n) * rev(f(n, n)) % mo)
0