結果

問題 No.1287 えぬけー
ユーザー tyawanmusityawanmusi
提出日時 2020-09-30 19:58:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 221 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 7,996 KB
最終ジャッジ日時 2023-09-21 01:04:02
合計ジャッジ時間 1,656 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def egcd(a, b):
  if a == 0:
    return b, 0, 1
  else:
    g, y, x = egcd(b % a, a)
    return g, x - (b // a) * y, y
mod=10**9+7
x,k=map(int,input().split())
gcd,a,b=egcd(mod-1,-k)
b*=-1
b%=mod-1
n=pow(x,b,mod)
print(n)
0