0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-14 16:18:49 +00:00
OI-codes/Luogu/problem/CF1374A/CF1374A.cpp

15 lines
229 B
C++
Raw Normal View History

2020-11-16 11:24:07 +00:00
#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;
}