結果

問題 No.3133 法B逆元
ユーザー Facade
提出日時 2025-05-03 12:40:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 133 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 82,900 KB
実行使用メモリ 67,324 KB
最終ジャッジ日時 2025-05-03 12:40:15
合計ジャッジ時間 2,317 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 1 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n,b=map(int,input().split())
if n==0 or (b%n==0 and math.gcd(n,b)!=1):
    print("NaN")
    exit()
i=pow(n,-1,b)
print(i)
0