0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 21:56:28 +00:00

CF1374A Required Remainder

R42012394
This commit is contained in:
Baoshuo Ren 2020-11-16 19:24:07 +08:00 committed by Baoshuo Ren
parent e2c361566e
commit 15bec61c23
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,14 @@
#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;
}