Codeforces 1374A. Required Remainder Solution
- Solution in C++:
- ///**********ALLAH IS ALMIGHTY************///
- ///AH Tonmoy
- ///Department of CSE,23rd batch
- ///Islamic University,Bangladesh
- #include<iostream>
- using namespace std;
- int main()
- {
- int x,y,n,t;
- cin>>t;
- while(t--)
- {
- cin>>x>>y>>n;
- cout<<(n-y)/x*x+y<<endl;
- }
- }
https://artisanal-builder-5141.ck.page/87f55a4a30
ReplyDelete