300683: CF130D. Exponentiation
Memory Limit:64 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
D. Exponentiationtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output
You are given integers a, b and c. Calculate ab modulo c.
InputInput data contains numbers a, b and c, one number per line. Each number is an integer between 1 and 100, inclusive.
OutputOutput ab mod c.
ExamplesInput2Output
5
40
32Input
2Output
5
26
6