結果
| 問題 |
No.3133 法B逆元
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-18 03:35:03 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 6,209 ms |
| コンパイル使用メモリ | 332,164 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-05-18 03:35:11 |
| 合計ジャッジ時間 | 6,595 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll = long long;
int N,B;
void solve(){
for(int i = 0;i<B;i++){
if((N%B)*(i)%B==1%B){
cout<<i<<endl;
return;
}
}
cout<<"NaN"<<endl;
}
signed main(){
cin >> N >> B;
solve();
}