結果

問題 No.1287 えぬけー
ユーザー chineristACchineristAC
提出日時 2020-10-01 09:48:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 273 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 77,556 KB
最終ジャッジ日時 2023-09-21 06:55:17
合計ジャッジ時間 2,744 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,456 KB
testcase_01 AC 72 ms
71,252 KB
testcase_02 AC 77 ms
71,360 KB
testcase_03 AC 75 ms
71,168 KB
testcase_04 AC 75 ms
71,304 KB
testcase_05 AC 265 ms
77,396 KB
testcase_06 AC 267 ms
77,432 KB
testcase_07 AC 273 ms
77,452 KB
testcase_08 AC 257 ms
77,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.readline

mod = 10**9+7

t = int(input())

assert(1<=t<=10**5)

for _ in range(t):
    x,k = map(int,input().split())

    assert(0<=x<mod)
    assert(1<=k<=5*10**8)
    assert(k%2==1)

    q = pow(k,5*10**8+1,mod-1)
    print(pow(x,q,mod))

g = input()
0