博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Rightmost Digit
阅读量:2038 次
发布时间:2019-04-28

本文共 930 字,大约阅读时间需要 3 分钟。

题解:快速幂

/**@Author:   STZG*@Language: C++*/#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
//#define DEBUG#define RI register int#define endl "\n"using namespace std;typedef long long ll;//typedef __int128 lll;const int N=100000+10;const int M=100000+10;const int MOD=1e9+7;const double PI = acos(-1.0);const double EXP = 1E-8;const int INF = 0x3f3f3f3f;int t,n,m,k,p,l,r,u,v;int ans,cnt,flag,temp,sum;int a[N];char str;struct node{};ll power(ll a,ll b, ll c){ ll res=1; ll base=a%c; while(b){ if(b&1)res=(base*res)%c; base=(base*base)%c; b>>=1; } return res;}int main(){#ifdef DEBUG freopen("input.in", "r", stdin); //freopen("output.out", "w", stdout);#endif //ios::sync_with_stdio(false); //cin.tie(0); //cout.tie(0); scanf("%d",&t); while(t--){ scanf("%d",&n); cout<
<

 

转载地址:http://pqzof.baihongyu.com/

你可能感兴趣的文章
哈希拉链法
查看>>
简析 IOS 程序图标的设计
查看>>
ColorMatrix
查看>>
Android图片处理(Matrix,ColorMatrix)
查看>>
xcode import<xx/xx.h> 头文件报错
查看>>
各种开源协议License明细
查看>>
cmake命令 安装、用法简介
查看>>
Android数据库安全解决方案,使用SQLCipher进行加解密
查看>>
cocos2d-x 环境配置-Mac配置篇
查看>>
GoldWave用法简介
查看>>
cocos2d-x避免手动修改android.mk文件来编译
查看>>
XMPPFramewok的使用
查看>>
C++的XML编程经验――LIBXML2库使用指南
查看>>
ubuntu+ndk编译ffmpeg
查看>>
Mac上安装MySQL
查看>>
Mac上搭建openfire服务器
查看>>
如何使用TCP/IP与服务器进行通信-一个简单的聊天程序
查看>>
关于Objective-c和Java下DES加密保持一致的方式
查看>>
在 ios 下实现 DataOutputStream 和 DataInputStream
查看>>
Myeclipse 10 for mac 安装过程及myeclipse 10 for mac 破解版下载
查看>>