結果

問題 No.1206 OR, OR, OR......
ユーザー tamatotamato
提出日時 2020-09-06 17:19:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 87,444 KB
実行使用メモリ 71,680 KB
最終ジャッジ日時 2023-08-19 14:07:44
合計ジャッジ時間 2,107 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,640 KB
testcase_01 AC 68 ms
71,204 KB
testcase_02 AC 68 ms
71,468 KB
testcase_03 AC 65 ms
71,680 KB
testcase_04 AC 63 ms
71,412 KB
testcase_05 AC 65 ms
71,552 KB
testcase_06 AC 68 ms
71,400 KB
testcase_07 AC 63 ms
71,528 KB
testcase_08 AC 61 ms
71,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    for _ in range(int(input())):
        N, K = map(int, input().split())
        print(((pow(2, N*K, mod) * N)%mod - (pow(2, (N-1)*K, mod) * N)%mod)%mod)


if __name__ == '__main__':
    main()
0