Toggle Navigation
acm.bjtu
首页
题目
比赛
题单
讨论
关于
登录
注册
Problems
Status
Standings
1661. Funny Function
时间限制
1000
ms 内存限制
32
MB
Function $F_{x,y}$satisfies:
For given integers N and M,calculate $F_{m,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
\n · \n · \n
样例输出
复制
2 33
\n \n
提交
请先
登录
提交
Source
2017 Multi-University Training Contest - Team 2