結果

問題 No.1206 OR, OR, OR......
ユーザー 👑 KazunKazun
提出日時 2020-08-30 15:40:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 82,768 KB
実行使用メモリ 54,032 KB
最終ジャッジ日時 2024-04-27 09:04:23
合計ジャッジ時間 1,063 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,744 KB
testcase_01 AC 40 ms
52,756 KB
testcase_02 AC 39 ms
53,096 KB
testcase_03 AC 40 ms
53,680 KB
testcase_04 AC 40 ms
54,032 KB
testcase_05 AC 40 ms
53,096 KB
testcase_06 AC 39 ms
52,996 KB
testcase_07 AC 38 ms
52,340 KB
testcase_08 AC 39 ms
52,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
Mod=998244353

X=[0]*T
for i in range(T):
    N,K=map(int,input().split())
    alpha=pow(2,(N-1)*K,Mod)
    beta=pow(2,K,Mod)
    X[i]=(N*alpha*(beta-1))%Mod

print("\n".join(map(str,X)))
0