2267 - MiaoWu's Function
时间限制 : 1 秒
内存限制 : 128 MB
Given n,k and the function f(n,k) = 1^k + 2^k + ... + n^k , you're supposed to calculate it.
题目输入
Multiple test cases.
Each line contains two numbers n,k(1<=n,k<=10^9)
题目输出
Output the last digit of the function f(n,k)
输入/输出样例
输入格式
1 1 8 4 2 5 3 2 5 2 8 3 2 4
输出格式
1 2 3 4 5 6 7