#A. 【模板】有理数取余

    Type: RemoteJudge 1000ms 125MiB

【模板】有理数取余

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给出一个有理数 c=abc=\frac{a}{b},求 cmod19260817c \bmod 19260817 的值。

这个值被定义为 bxa(mod19260817)bx\equiv a\pmod{19260817} 的解。

输入格式

一共两行。

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

输出格式

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

233
666

18595654

提示

对于所有数据,保证 0a10100010\leq a \leq 10^{10001}1b10100011 \leq b \leq 10^{10001},且 a,ba, b 不同时是 1926081719260817 的倍数。

ch17 - 数论

Not Claimed
Status
Done
Problem
8
Open Since
2024-1-28 0:00
Deadline
2024-3-3 23:59
Extension
2400 hour(s)