#P10446. Modular Multiplication

    ID: 12455 Type: Default 1000ms 256MiB

Modular Multiplication

Modular Multiplication

Given three integers a, b, and p, compute the value of \(a \times b \mod p\).

inputFormat

The input consists of a single line containing three space-separated integers: a, b, and p.

outputFormat

Output the result of the operation \(a \times b \mod p\) as a single integer.

sample

2 3 5
1