#2756. 龟速乘
龟速乘
Background
求 乘 对 取模的值。
Input
第一行输入整数,第二行输入整数,第三行输入整数。
Output
输出一个整数,表示a*b mod p
的值。
Samples
3 4 5
2
Limitation
求 a 乘 b 对 p 取模的值。
第一行输入整数a,第二行输入整数b,第三行输入整数p。
输出一个整数,表示a*b mod p
的值。
3 4 5
2
1≤a,b,p≤1018
By signing up a 黑猫OJ universal account, you can submit code and join discussions in all online judging services provided by us.