MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/Maths/RequiredRemainder.cpp:8–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8int main()
9
10{
11
12int t;
13cin>>t;
14int x,y,n,k;
15for(int i=0;i<t;i++){
16 cin>>x>>y>>n;
17 if((n-n%x+y)<=n){
18 cout<<n-n%x+y<<endl;
19 }
20 else{
21 cout<<n-n%x+y-x<<endl;
22 }
23}
24return 0;
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected