mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-24 04:48:52 +00:00
CF1374A Required Remainder
R42012394
This commit is contained in:
parent
e2c361566e
commit
15bec61c23
14
problem/CF1374A/CF1374A.cpp
Normal file
14
problem/CF1374A/CF1374A.cpp
Normal 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user