题目描述
You are given three numbers $a$, $b$, $c$ . Write a program to determine the largest number that is less than or equal to $c$ and leaves a remainder $b$ when divided by $a$.
-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow.
- Each testcase contains a single line of input, having three integers $a$, $b$, $c$.
-----Output:-----
- For each testcase, output in a single line the largest number less than or equal to $c$.
-----Constraints:-----
- $1 \leq T \leq 100000$
- $0 \leq b < a < c \leq$ $10$^18
-----Sample Input:-----
1
7 2 10
-----Sample Output:-----
9
输入格式
见题面
输出格式
见题面
样例输入
['1', '7 2 10']
样例输出
['9']