Contests | Virtual Contests | Problems | Submit | Runs Status | Rank List | Forum |

Time Limit: 1.0 Seconds Memory Limit: 65536K

Total Runs: 868 Accepted Runs: 281

We have a formula

Now, you will get several inputs. Each input has two numbers n,m. Please output the last two digits of S_m(n).

The first line of the input is an integer T which is the sum of test case. Then there are T lines following. Each line contains two integers, the first integer is n(10≤`n`≤1000) and the second is m(10≤`m`≤1000000).

3 10 10 10 1000000 234 234

25 33 45

Maintance:Fxz. Developer: SuperHacker, G.D.Retop, Fxz