結果

問題 No.986 Present
ユーザー esforco_esforco_
提出日時 2020-03-05 01:13:29
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,120 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2023-08-04 03:33:36
合計ジャッジ時間 12,804 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,968 KB
testcase_01 AC 16 ms
7,796 KB
testcase_02 AC 18 ms
7,968 KB
testcase_03 AC 565 ms
7,804 KB
testcase_04 AC 44 ms
7,864 KB
testcase_05 AC 458 ms
7,976 KB
testcase_06 AC 273 ms
7,756 KB
testcase_07 AC 29 ms
7,812 KB
testcase_08 AC 191 ms
7,964 KB
testcase_09 AC 643 ms
7,864 KB
testcase_10 AC 16 ms
7,800 KB
testcase_11 AC 415 ms
7,804 KB
testcase_12 AC 374 ms
7,932 KB
testcase_13 AC 23 ms
7,860 KB
testcase_14 AC 68 ms
7,960 KB
testcase_15 AC 1,011 ms
7,864 KB
testcase_16 AC 59 ms
7,864 KB
testcase_17 AC 729 ms
7,856 KB
testcase_18 AC 421 ms
7,820 KB
testcase_19 AC 209 ms
7,868 KB
testcase_20 AC 21 ms
7,860 KB
testcase_21 AC 1,049 ms
7,816 KB
testcase_22 AC 793 ms
7,796 KB
testcase_23 AC 333 ms
7,868 KB
testcase_24 AC 1,120 ms
7,920 KB
testcase_25 AC 180 ms
7,752 KB
testcase_26 AC 1,120 ms
7,800 KB
testcase_27 AC 724 ms
7,828 KB
testcase_28 AC 16 ms
7,948 KB
testcase_29 AC 16 ms
7,828 KB
testcase_30 AC 16 ms
7,872 KB
testcase_31 AC 16 ms
7,832 KB
testcase_32 AC 15 ms
7,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def div(x, y):
    return x * pow(y, MOD - 2, MOD) % MOD

n, m = map(int, input().split())

r, u, d = 1, 1, 1

MOD = 998244353

for i in range(n):
    r *= pow(2, m, MOD) - pow(2, i, MOD)
    r %= MOD
    
    u *= pow(2, n, MOD) - pow(2, i, MOD)
    u %= MOD
    
    d *= i+1
    d %= MOD


print(pow(2, n, MOD), div(r, d), div(r, u))
0