Problem Description

Integers a b m are provided. Output (a^b) % m. Use fast power (pow with mod).

Input Format

One line: a b m.

Output Format

One integer ans.

Sample Test Case

Input:
2 10 1000
Output:
24

Constraints

0

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next