1902 : Alex and Number

时间限制:1 Sec 内存限制:128 MiB
提交:95 答案正确:16

提交 状态 讨论区

题目描述

Alex love Number theory. Today he think a easy problem, Give you number N and L, To calculate N^1 + N^2 + N^3 + ... + N^L, And ans will mod 1e9+7

输入

 Many test of input(about 10W case), each input contains number N and L, 1 <= N, L <= 2147483647

输出

 Contains a number with your answer

样例输入

复制
2 5
3 5
10 10

样例输出

复制
62
363
111111033

提示


			

来源

[NBUT]Alex