当前位置:网站首页>2022 Henan Mengxin League Game (5): University of Information Engineering C - Throwing a Handkerchief
2022 Henan Mengxin League Game (5): University of Information Engineering C - Throwing a Handkerchief
2022-08-10 06:33:00 【WA_Automata】
C - 丢手绢
求一下 x + m ∗ 1 0 k x + m * 10^{k} x+m∗10k 就可以了,Remember to take the modulo in the middle
#include<iostream>
using namespace std;
typedef long long LL;
LL ksm(LL a,LL b,LL p)
{
LL res=1;
for(;b;b>>=1)
{
if(b&1) res=res*a%p;
a=a*a%p;
}
return res;
}
int main()
{
LL n,m,k,x;
cin>>n>>m>>k>>x;
cout<<(x+m*ksm(10,k,n)%n)%n<<endl;
return 0;
}
边栏推荐
猜你喜欢
随机推荐
【8月9日活动预告】Prometheus峰会
Introduction to KDE Framework
3-6月面经总结,200多页真题笔记和详解(含核心考点及6家大厂)
UE 游戏模式
强化学习_10_Datawhale稀疏奖励
BUUCTF笔记(web)
高质量WordPress下载站模板5play主题
2022河南萌新联赛第(五)场:信息工程大学 B - 交通改造
QScroller的QScrollerProperties参数研究
The difference between initializing objects as null and empty objects in JS
Unity扩展编辑器EditorWindow 小玩意(一)
socket实现进程间通信
OpenGL学习笔记(LearnOpenGL)-第三部分 绘制矩形
关于MongoDb查询Decimal128转BigDecimal问题
I would like to ask you guys, when FLink SQL reads the source, specify the time field of the watermark. If the specified field is in the grid
761. 特殊的二进制序列
webSocket教程
ACPI知识(高级配置和电源接口)
order by注入与limit注入,以及宽字节注入
进制的前缀表示和后缀表示


![[Network Security] Practice AWVS Range to reproduce CSRF vulnerability](/img/7f/f08e429e3d8ede03a1c1754e256f99.png)






