Problem A: 有理数取余

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:5 Solved:4

Description

给出一个有理数 ,求 的值。

这个值被定义为 的解。

Input

一共两行。

第一行,一个整数
第二行,一个整数

Output

一个整数,代表求余后的结果。如果无解,输出 Angry!

Sample Input Copy

233
666

Sample Output Copy

18595654

HINT

对于所有数据,保证

,且 不同时是 的倍数


需要使用快速输入,模板如下:


typedef long long ll;

const ll mod=19260817;

ll getint() {

char c=getchar();

while(!isdigit(c)) c=getchar();

ll ans=0;

while(isdigit(c)) {

ans=(ans<<1)+(ans<<3)+c-'0';

ans%=mod; c=getchar();

}

return ans;

}