会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Live2D
不要学习szb
你谷蒟蒻一枚
博客园
首页
新随笔
联系
订阅
管理
2020年10月5日
快速幂学习笔记
摘要: 背景:给定$a$,\(b\),\(m\),求 \(a^b \mod m\) 常规方法: $O(n)$的时间复杂度,循环一遍即可,程序如下(用pow函数也可): #include <iostream> using namespace std; int a,b,m; int ans=1; int mai
阅读全文
posted @ 2020-10-05 22:36 不要学习szb
阅读(79)
评论(0)
推荐(0)
公告