EIPMOD - Power mod
Xem dạng PDF
Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Given there integer ~x, n, k~ ~(0\le n \le 10^{18}, 1 \le x, k \le 10^9)~, calculate ~x^n~ ~\%~ ~k~ with ~\%~ is remainder operator.
Input
- Three integer ~x, n, k~
Output
- The value of ~x^n~ ~\%~ ~k~
Example Input
2 10 100
Example Output
24
Bình luận