QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#216710 | #5. 在线 O(1) 逆元 | trisolaris | Compile Error | / | / | C++20 | 384b | 2023-10-15 21:30:06 | 2023-10-15 21:30:07 |
Judging History
你现在查看的是测评时间为 2023-10-15 21:30:07 的历史记录
- [2024-11-05 21:53:54]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-10-15 21:30:07]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-10-15 21:30:06]
- 提交
answer
#include <bits/stdc++.h>
typedef long long ll;
const int N = 3e5 + 10, mod = 998244353;
ll rp(ll a, ll b, ll p) {
ll res = 1;
for( ; b; b >>= 1) {
if(b & 1)
res = (res * a) % p;
a *= a, a %= p;
}
return res;
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
ll n;
std::cin >> n;
std::cout << rp(n, mod - 2, mod) << "\n";
}
Details
implementer.cpp: In function ‘int main()’: implementer.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 22 | scanf("%d", &n); | ~~~~~^~~~~~~~~~ /usr/bin/ld: /tmp/cc4lcisJ.o: in function `main': answer.code:(.text.startup+0x0): multiple definition of `main'; /tmp/ccSaFxlH.o:implementer.cpp:(.text.startup+0x0): first defined here /usr/bin/ld: /tmp/ccSaFxlH.o: in function `main': implementer.cpp:(.text.startup+0x153): undefined reference to `init(int)' /usr/bin/ld: implementer.cpp:(.text.startup+0x1f8): undefined reference to `inv(int)' collect2: error: ld returned 1 exit status