結果
問題 |
No.3133 法B逆元
|
ユーザー |
![]() |
提出日時 | 2025-05-02 21:38:57 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 179 bytes |
コンパイル時間 | 225 ms |
コンパイル使用メモリ | 82,276 KB |
実行使用メモリ | 53,908 KB |
最終ジャッジ日時 | 2025-05-02 21:38:59 |
合計ジャッジ時間 | 1,758 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 8 |
ソースコード
import math N,B=map(int,input().split()) if B==1: print(0) exit() if math.gcd(N,B)!=1: print('Nan') exit() if N%B==0: print('Nan') else: print(pow(N,-1,B))