#P1378. [算法竞赛进阶指南]64位整数乘法

[算法竞赛进阶指南]64位整数乘法

Description

求a乘b对p取模的值,其中 1a,b,p10181≤a,b,p≤10^18

Input Format

a,b,p

Output Format

输出a乘b对p取模的值

250182048980811753
413715569939057660
133223633696258584​
19308689043391716​

Source

位运算 数论