結果
| 問題 | No.1206 OR, OR, OR...... | 
| コンテスト | |
| ユーザー |  cleantted | 
| 提出日時 | 2020-08-30 14:36:17 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 34 ms / 2,000 ms | 
| コード長 | 637 bytes | 
| コンパイル時間 | 385 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 11,008 KB | 
| 最終ジャッジ日時 | 2024-11-15 07:44:30 | 
| 合計ジャッジ時間 | 1,113 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 8 | 
ソースコード
import sys
from collections import deque
import bisect
import copy
import heapq
import itertools
import math
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
# mod = 10 ** 9 + 7
mod = 998244353
def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]
def main():
    T = int(input())
    for _ in range(T):
        N, K = read_values()
        print(((N * pow(2, (N - 1) * K, mod)) % mod) * (pow(2, K, mod) - 1) % mod)
if __name__ == "__main__":
    main()
            
            
            
        