new file: P2613.cpp
Check cpp / md pair / Check md headers (push) Failing after 2s

This commit is contained in:
hanyixuanten committed 2026-10-22 11:57:14 +00:00
1 parent 64415e876b
commit cd0c65ca4e
2 files changed
+71

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 19260817;
signed main() {
auto read = [](int &x) {
x = 0;
char c = getchar();
while (c < '0' || c > '9')
c = getchar();
while (c >= '0' && c <= '9')
x = (x * 10 + c - '0') % mod, c = getchar();
};
auto qpow = [](int a, int b) {
a %= mod;
int ans = 1;
while (b) {
if (b & 1)
ans = (ans * a) % mod;
a = (a * a) % mod;
b >>= 1;
}
return ans;
};
int a, b;
read(a), read(b);
if (a == 0 || b == 0)
printf("Angry!\n");
else
printf("%lld\n", (a * qpow(b, mod - 2)) % mod);
return 0;
}