博客
关于我
hdu 2035 人见人爱A^B
阅读量:139 次
发布时间:2019-02-27

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

#include 
using namespace std;#define LL long longint qp(LL a, LL b, int mod){ int res = 1; while(b){ if(b&1) res = res*a%mod; a = a*a%mod; b >>= 1; } return res;}int main(){ int a, b; while(scanf("%d %d", &a, &b) == 2){ if(a == 0 && b == 0) break; printf("%d\n", qp(a, b, 1000)); } return 0;}

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

你可能感兴趣的文章
mysql中having的用法
查看>>
MySQL中interactive_timeout和wait_timeout的区别
查看>>
mysql中int、bigint、smallint 和 tinyint的区别、char和varchar的区别详细介绍
查看>>
mysql中json_extract的使用方法
查看>>
mysql中json_extract的使用方法
查看>>
mysql中kill掉所有锁表的进程
查看>>
mysql中like % %模糊查询
查看>>
MySql中mvcc学习记录
查看>>
mysql中null和空字符串的区别与问题!
查看>>