結果

問題 No.1206 OR, OR, OR......
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-11-12 08:37:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 55,728 KB
最終ジャッジ日時 2023-11-12 08:37:49
合計ジャッジ時間 1,668 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
55,728 KB
testcase_01 AC 45 ms
55,728 KB
testcase_02 AC 46 ms
55,728 KB
testcase_03 AC 46 ms
55,728 KB
testcase_04 AC 45 ms
55,728 KB
testcase_05 AC 45 ms
55,728 KB
testcase_06 AC 46 ms
55,728 KB
testcase_07 AC 47 ms
55,728 KB
testcase_08 AC 47 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import *
from itertools import *
from functools import *
from collections import *
import sys,math
input = sys.stdin.readline

mod = 998244353
def answer():
    
    N,K = map(int,input().split())
    
    print(N*(pow(2,N*K,mod) - pow(2,(N-1)*K,mod))%mod)

for _ in range(int(input())):
    answer()
    
0