省SD2017 G sum of power【water】
来源:互联网 发布:文字办公软件 编辑:程序博客网 时间:2024/06/10 16:17
sum of power
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 12 Solved: 7
[Submit][Status][Discuss]
Description
Input
Input contains two integers n,m(1≤n≤1000,0≤m≤10).
Output
Output the answer in a single line.
Sample Input
10 0
Sample Output
10
HINT
Source
山东省第八届ACM程序设计大赛2017.5.7
//这题就是有毒
//出题少个0,不过分么
//怀疑鱼生
#include <iostream>#include <string>#include <algorithm>#include <cstring>#include <cstdio>#include <cmath>using namespace std;#define angel 0x3f3f3f3f#define mod 1000000007#define ll long long intll n,m;ll ans,t;int main(){ while(cin>>n>>m) { ans=0; for(ll i=1;i<=n;i++) { t=1; for(ll j=1;j<=m;j++) { t*=i; t=t%mod; } ans+=t; ans%=mod; } cout<<ans<<endl; } return 0;}
阅读全文
0 0
- 省SD2017 G sum of power【water】
- 省SD2017 A Return of the Nim【威佐夫博弈+NIM】
- sum of power
- sum of power
- 山东省第八届 ACM 省赛 G sum of power (简单快速幂)
- 山东省第八届ACM省赛 G 题(sum of power)
- 山东省第八届ACM省赛 G 题 sum of power 解答
- uva 766 sum of power
- 省SD2017 I Parity check【大数+规律】
- sum of power——大数取模
- 第八届山东省赛题->sum of power
- acm省赛--D sum of power快速幂
- 省SD2017 D HEX【乘法逆元+排列+转化】
- NBUT The Sum of F(x) and G(x)
- NBUT 1555 The Sum of F(x) and G(x)
- [noj 1555] The Sum of F(x) and G(x)
- G - Sum
- Hackerrank Coprime Power Sum
- xilinx_platform_cable_usb驱动安装
- MYSQL OR与AND一起 的用法
- JavaWeb的Cookie相关操作
- struts2 视图发请求到Action
- Linux ./configure && make && make install 编译安装和卸载
- 省SD2017 G sum of power【water】
- textarea 提示文字,点击消失
- CDH配置报警服务
- MFC VC PreTranslateMessage详解
- 对象转化成键值对
- 教你如何实现android沉浸式状态栏(布局)
- 工厂模式
- mongodb安装
- echarts-柱状图