結果

問題 No.1206 OR, OR, OR......
ユーザー ああいいああいい
提出日時 2022-06-12 16:11:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 81,704 KB
実行使用メモリ 53,440 KB
最終ジャッジ日時 2023-10-24 11:46:33
合計ジャッジ時間 1,370 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

T = int(input())

P = 998244353
def calc(n,k):
    N = n
    K = k
    tmp = pow(2,N * K,P) - pow(2,(N - 1) * K,P)
    return n * tmp % P
for _ in range(T):
    n,k = map(int,input().split())
    print(calc(n,k))
    
0