HDU6027-Easy Summation-简单数学
来源:互联网 发布:图书数据加工公司招聘 编辑:程序博客网 时间:2024/05/19 02:31
//传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6027#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#include <string>#include <cmath>#include <vector>#include <queue>#include <stack>#include <set>#include <map>using namespace std;#define FOR(i,k,n) for(int i=k;i<n;i++)#define FORR(i,k,n) for(int i=k;i<=n;i++)#define scan(a) scanf("%d",&a)#define scann(a,b) scanf("%d%d",&a,&b)#define scannn(a,b,c) scanf("%d%d%d",&a,&b,&c)#define mst(a,n) memset(a,n,sizeof(a))#define ll long long#define N 1005#define mod 1000000007#define INF 0x3f3f3f3fconst double eps=1e-8;const double pi=acos(-1.0);int main(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); int t; cin>>t; while(t--) { ll n,k; cin>>n>>k; ll ans=0; for(ll i=1;i<=n;i++) { ll tmp=1; for(ll j=0;j<k;j++) { tmp=tmp*i%mod; } ans=(ans+tmp)%mod; } cout<<ans<<endl; } return 0;}
0 0
- HDU6027-Easy Summation-简单数学
- HDU6027-Easy Summation
- HDU6027 Easy Summation
- HDU6027 Easy Summation 2017中国大学生程序设计竞赛
- Easy Summation
- Easy Summation
- HDU 6027 Easy Summation【简单相加||快速幂】
- HDU 6027 Easy Summation
- HDU 6027 Easy Summation
- HDU 6027 Easy Summation
- hdoj 6027 Easy Summation
- HDU 6027 Easy Summation
- 杭电6027 Easy Summation
- [简单数学]ZOJ 2969 Easy Task
- bzoj3450 Tyvj1952 Easy 简单的数学期望
- 2017女生赛 1005 Easy Summation【】
- HDU 6027 Easy Summation (gcd)
- (HDU 6027 女生专场)Easy Summation 水题 预处理
- vijos P1005 超长数字串 解题报告
- Mask RCNN in TensorFlow
- 关于js中两种定时器的设置及清除
- 系统监控利器-dstat命令(1)
- 面试准备
- HDU6027-Easy Summation-简单数学
- 银行家算法
- 387. First Unique Character in a String
- Androidannotations框架使用(二)——(AA框架简单使用)
- python颜色过渡
- 逻辑斯蒂回归,最大熵模型及其等价性
- python2 与 python3的区别
- TCP/IP协议简记
- python min()函数需要注意的一些小点