luogu#P10446. 64位整数乘法

64位整数乘法

Problem Description

Find the value of aa multiplied by bb modulo pp.

Input Format

The first line contains an integer aa, the second line contains an integer bb, and the third line contains an integer pp.

Output Format

Output one integer, representing the value of a*b mod p.

3
4
5
2

Hint

1a,b,p10181 \le a,b,p \le 10^{18}

Translated by ChatGPT 5