結果

問題 No.1206 OR, OR, OR......
ユーザー cleanttedcleantted
提出日時 2020-08-30 14:36:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 637 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 10,776 KB
実行使用メモリ 9,000 KB
最終ジャッジ日時 2023-08-09 12:33:24
合計ジャッジ時間 1,608 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
8,792 KB
testcase_01 AC 23 ms
8,772 KB
testcase_02 AC 23 ms
8,876 KB
testcase_03 AC 23 ms
8,956 KB
testcase_04 AC 24 ms
8,800 KB
testcase_05 AC 24 ms
9,000 KB
testcase_06 AC 23 ms
8,868 KB
testcase_07 AC 23 ms
8,952 KB
testcase_08 AC 22 ms
8,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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()

0