SUMPOWK1 - Sum of Powers
Given two integers N and K you have to calculate:
Input
The first line of the input is T (1 <= T <= 105), the number of test cases.
Then T lines each line consist of N (1 <= N <= 1018) and K (0 <= K <= 5)
Output
Print the answer modulo 100,000,007 (108 + 7).
Example
Input: 3 5 2 1 5 10 3 Output: 55 1 3025
hide comments
[Lakshman]:
2014-04-16 17:26:05
I really don't understand the reason of WA for this easy problem.
|
|
Francky:
2013-05-02 14:57:05
It's a good tutorial problem, I would like to recommend it to some friends, but I want it to be python3 feasible, please increase time limit to let all common languages a chance to get AC with normal IO. Thanks for taking that into consideration.
|
|
Francky:
2013-05-01 20:00:48
There is a search engine here, and you can browse the problems. Not all, but you can sort them by number of solvers, I recommend you to read all with many solvers.
|
|
[Lakshman]:
2013-05-01 17:46:18
Please increase the time limit for slow languages like java....
|
|
Francky:
2013-05-01 15:51:16
It is tutorial!
|
|
devu:
2013-05-01 14:45:06
Poor Problem .. Move it to Tutorial
|
|
yaswanth:
2013-05-01 13:53:38
can u please tell me where is the mistake in my code??
|
|
(Tjandra Satria Gunawan)(曾毅昆):
2013-05-01 11:43:37
this is much easier than my ASUMHARD problem :-P |
Added by: | Hasan Jaddouh |
Date: | 2013-04-30 |
Time limit: | 2s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | own problem |