当前位置:网站首页>幂次方(暑假每日一题 20)
幂次方(暑假每日一题 20)
2022-08-10 08:34:00 【sweetheart7-7】
对任意正整数 N N N,计算 X N m o d 233333 X^N~mod~233333 XN mod 233333 的值。
输入格式
共一行,两个整数 X X X 和 N N N。
输出格式
共一行,一个整数,表示 X N m o d 233333 X^N~mod~233333 XN mod 233333 的值。
数据范围
1 ≤ X , N ≤ 1 0 9 1≤X,N≤10^9 1≤X,N≤109
输入样例:
2 5
输出样例:
32
#include<iostream>
using namespace std;
typedef long long LL;
const int mod = 233333;
int pow(int x, int n){
int res = 1;
while(n){
if(n & 1) res = ((LL)res * x) % mod;
x = ((LL)x * x) % mod;
n >>= 1;
}
return res;
}
int main(){
int x, n;
cin >> x >> n;
cout << pow(x, n) << endl;
return 0;
}
边栏推荐
- Rust learning: 6.1_Slices of composite types
- m.bjhjwy.com全面教学设备 类型包括: 教学仪器, 教学设备 ,
- Obtain - 65 [chances] : "soldiers, subtlety also - 7-36 meter reading - defeat
- 同步锁synchronized追本溯源
- [深入研究4G/5G/6G专题-56]: L3信令控制-5-无线承载管理
- Go-Excelize API source code reading (11) - GetActiveSheetIndex()
- Introduction to the C language to realize bubble sort
- [In-depth study of 4G/5G/6G topic-56]: L3 signaling control-5-radio bearer management
- J9 Number Theory: Macro Analysis of DAO Characteristics
- day16--抓包工具Charles的使用
猜你喜欢
2022-08-01 Advanced Network Engineering (23) Advanced VLAN Technology - VLAN Aggregation, MUX VLAN
【NeRF】原始论文解读
PHP笔记 28 29 30 31
DGIOT 30 million meters set pressure reading
颜色选择器的使用
day16--抓包工具Charles的使用
【FAQ】【Push Kit】推送服务,回执配置一直报错、回执过期修改、怎么删除配置的回执
Unity—UGUI control
2022-08-01 网工进阶(二十四) STP进阶知识
怎么使用【jmeter正则表达式提取器】解决返回值作参数的问题
随机推荐
PTA Exercise 2.2 Rotate an Array Left
[In-depth study of 4G/5G/6G topic-56]: L3 signaling control-5-radio bearer management
iwemeta元宇宙:一个娃娃卖9999元,泡泡玛特认为一点也不贵
winget包管理器
iwemeta元宇宙:阿里首任COO:如何打造销售铁军
菜鸟、小白在autojs和冰狐智能辅助之间如何选择?
Johnson全源最短路
Uni applet Tencent map polygon background transparency
VS2013-debug assembly code-generate asm file-structure memory layout-function parameter stack-calling convention
The precise effect of network integration promotion outsourcing in the era of Internet of Things-Shenzhen Win-Win World News
PTA 习题2.1 简单计算器
ARM Architecture 2: Processor Core and Assembly Instruction Set
How AliExpress sellers seize product search weight
js函数聚合的三种实现方式
The implementation of the seemingly useless component (text gradient) in NaiveUI is so simple
基于sklearn的决策树应用实战
NaiveUI中看起来没啥用的组件(文字渐变)实现原来这么简单
Introduction to the C language to realize bubble sort
js--------对象数组转换成二维数组(excel表格导出)
Summary of ctfshow SSTI knowledge points