mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-18 13:51:58 +00:00
15 lines
229 B
C++
15 lines
229 B
C++
|
#include <bits/stdc++.h>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int main() {
|
||
|
int t;
|
||
|
cin >> t;
|
||
|
while (t--) {
|
||
|
int x, y, n, ans = 0;
|
||
|
cin >> x >> y >> n;
|
||
|
cout << (n - y) / x * x + y << endl;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|