hdu 2035 人见人爱A^B
来源:互联网 发布:vb.net能用的报表插件 编辑:程序博客网 时间:2024/06/05 05:18
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=2035
#include<algorithm>#include<iostream>#include<cstdlib>#include<cstring>#include<cstdio>#include<vector>#include<map>using std::map;using std::min;using std::find;using std::pair;using std::vector;using std::multimap;#define pb(e) push_back(e)#define sz(c) (int)(c).size()#define mp(a, b) make_pair(a, b)#define all(c) (c).begin(), (c).end()#define iter(c) __typeof((c).begin())#define cls(arr, val) memset(arr, val, sizeof(arr))#define cpresent(c, e) (find(all(c), (e)) != (c).end())#define rep(i, n) for(int i = 0; i < (int)n; i++)#define tr(c, i) for(iter(c) i = (c).begin(); i != (c).end(); ++i)const int M = 1000;const int N = 100001;const int INF = 0x3f3f3f3f;void pow_mod(int A, int B) { int ans = 1; while(B) { if(B & 1) ans = ans * A % M; A = A * A % M; B >>= 1; } printf("%d\n", ans);}int main() {#ifdef LOCAL freopen("in.txt", "r", stdin); freopen("out.txt", "w+", stdout);#endif int A, B; while(~scanf("%d %d", &A, &B), A + B) { pow_mod(A, B); } return 0;}
0 0
- (hdu 2035)人见人爱A^B
- HDU 2035 ( 人见人爱A^B )
- HDU 2035 人见人爱A^B
- hdu 2035人见人爱A^B
- HDU 2035 人见人爱A^B
- HDU 2035 人见人爱A^B
- HDU 2035 人见人爱A^B
- HDU 2035 人见人爱A^B
- hdu 2035 人见人爱A^B
- hdu-2035-人见人爱A^B
- HDU 2035 - 人见人爱A^B
- hdu 2035 人见人爱A^B
- [hdu 2035] 人见人爱A^B
- HDU 2035 人见人爱A^B
- HDU 2035 人见人爱A^B
- HDU 2035 人见人爱A^B
- HDU 2035 人见人爱A^B
- HDU 2035 人见人爱A^B
- The differences between AngularJS $apply, $digest, and $evalAsync
- 汉字数字转化为阿拉伯数字
- 28-linux中mysql的安装
- 题目1355:扑克牌顺子
- 1018. 锤子剪刀布 (20)
- hdu 2035 人见人爱A^B
- 数据存储:ContentProvider获取联系人
- iOS开发:通讯录之复杂文本字符串解析
- 结构体类型定义的一般式
- 1019. 数字黑洞 (20)
- LeetCode 1 找出两个数之和
- C# 窗口实现Win7简单屏幕泡泡保护程序 和实现聊天窗口震动
- What is VEX ?
- 深入学习微框架 Spring Boot