Responsive image

问题 1803 --Funny Function

1803: Funny Function

时间限制: 2 Sec  内存限制: 128 MB
提交: 33  解决: 0
[提交][状态][讨论版][命题人:]

题目描述

Function Fx,ysatisfies:

For given integers N and M,calculate Fm,1 modulo 1e9+7.

输入描述

There is one integer T in the first line.
The next T lines,each line includes two integers N and M .
1<=T<=10000,1<=N,M<2^63.

输出描述

For each given N and M,print the answer in a single line.

样例输入

2
2 2
3 3

样例输出

2
33

来源

 

[提交][状态]
ACM算法攻关部
  • Anything about this OnlineJudge, Please Contact Administrator. Click add QQ

    OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap

    Copyright 2016 ACM算法攻关部
    关于网站改版