# luogu P2613 【模板】有理数取余（费马小定理，乘法逆元）

## 题目传送门

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<cstring>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
//__int128, __int128_t
//#define int _int128
const int N = 500007, M = 500007, INF = 0x3f3f3f3f;
const double eps = 1e-6;
const ll mod = 19260817;
typedef pair<int, int >PII;

{
x = 0;
char o = getchar();
while(o < '0' || o > '9')o = getchar();
while(o >= '0' && 0 <= '9'){
x = ((x << 1) + (x << 3) + (o ^ 48)) % mod;
o = getchar();
}
}

ll qpow(ll a, ll b, ll mod)
{
ll res = 1;
while(b){
if(b & 1)res = res % mod * a % mod;
a = (a * a) % mod;
b >>= 1;
}
return res % mod;
}

ll a, b;

int main()
{

if(b == 0){
puts("Angry!");
return 0;
}

ll p = qpow(b, mod - 2, mod);
//p = (p % mod + mod)  % mod;
printf("%lld\n",                                                                                                                                                                                                                                                                                                p % mod * a % mod);
return 0;
}


04-12 26
08-14 542

01-20 104
09-23 39
08-21 20
03-14 368
05-25 41