結果
| 問題 |
No.3133 法B逆元
|
| コンテスト | |
| ユーザー |
eve__fuyuki
|
| 提出日時 | 2025-05-27 01:33:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 2,000 ms |
| コード長 | 339 bytes |
| コンパイル時間 | 2,139 ms |
| コンパイル使用メモリ | 194,492 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-05-27 01:33:27 |
| 合計ジャッジ時間 | 3,591 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
void fast_io() {
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
}
int main() {
fast_io();
unsigned long long n, b;
cin >> n >> b;
n %= b;
for (unsigned long long i = 0; i < b; i++) {
if (n * i % b == 1 % b) {
cout << i << endl;
return 0;
}
}
cout << "NaN" << endl;
}
eve__fuyuki