|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||512 MB||0||0||0||0.000%|
A function f : N3 → N where N stands for the set of non-negative integers, is defined as follows.
For example, f(2, 1, 2) = 0 and f(4, 2, 5) = 6.
The first line of the input contains an integer T, the number of test cases. T lines follow, one line per test case consisting of three space-separated integers a, b and M indicating that the value of f(a, b, M) is to be computed.
You may assume:
For each test case, output a single integer which denotes your answer modulo 109 + 7 in a line.
2 2 1 2 4 2 5