Description
Input
T represents a positive integer number of data sets
The next two positive integers each row line T represents N, M
Output
T lines each represent an integer of i-th group of data Results
Sample Input
1
4 5
4 5
Sample Output
122
HINT
T <= 10000
N, M<=10000000
answer
Vigorously push formula
The answer to that is seeking
ended