密码
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.
Background
Special for beginners, ^_^
Description
在数据加密传输场景中,需对关键数值进行幂次转换后取余处理,以保障数据安全性与传输效率。给定三个整数a、b、p,按规则计算对应结果并规范输出。转换规则为:先将a作b次幂运算,再取该结果与p的余数。
输入格式
输入只有一行三个整数,分别代表 。
输出格式
输出一行一个字符串 a^b mod p=s,其中 分别为题目给定的值, 为运算结果。
输入输出样例 #1
输入 #1
2 10 9
输出 #1
2^10 mod 9=7
说明/提示
样例解释
,。
数据规模与约定
对于 的数据,保证 ,,。
Limitation
1s, 1024KiB for each test case.
2025新生第三次周赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 7
- Start at
- 2025-11-23 8:45
- End at
- 2025-11-23 11:45
- Duration
- 3 hour(s)
- Host
- Partic.
- 27