D. A 的 B 次方

    Type: Default 1000ms 256MiB

A 的 B 次方

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

给出三个整数 a,b,m,求 abmodma^b mod m 的值。

Input Format

一行三个整数 a,b,m。

Output Format

一个整数,表示abmodm a^b mod m 的值。

2 100 1007
169

Hint

数据范围与提示:对于全部数据,1a,b,m109 1≤a,b,m≤10^9

寒假集训_01_09

Not Attended
Status
Done
Rule
XCPC
Problem
6
Start at
2025-1-9 14:00
End at
2025-1-9 17:00
Duration
3 hour(s)
Host
Partic.
41