結果

問題 No.1287 えぬけー
ユーザー rlangevinrlangevin
提出日時 2023-07-10 08:57:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 269 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 77,748 KB
最終ジャッジ日時 2023-10-10 01:09:01
合計ジャッジ時間 3,722 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,036 KB
testcase_01 AC 69 ms
71,240 KB
testcase_02 AC 69 ms
71,396 KB
testcase_03 AC 69 ms
71,224 KB
testcase_04 AC 69 ms
71,228 KB
testcase_05 AC 262 ms
77,520 KB
testcase_06 AC 265 ms
77,204 KB
testcase_07 AC 269 ms
77,748 KB
testcase_08 AC 249 ms
77,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T = int(input())
mod = 10 ** 9 + 7
for _ in range(T):
    X, K = map(int, input().split())
    inv = pow(K, mod - 4, mod - 1)
    print(pow(X, inv, mod))
0