Codeforces 1374A. Required Remainder Solution

  1. Solution in C++:
  2. ///**********ALLAH IS ALMIGHTY************///
  3. ///AH Tonmoy
  4. ///Department of CSE,23rd batch
  5. ///Islamic University,Bangladesh
  6. #include<iostream>
  7. using namespace std;
  8. int main()
  9. {
  10. int x,y,n,t;
  11. cin>>t;
  12. while(t--)
  13. {
  14. cin>>x>>y>>n;
  15. cout<<(n-y)/x*x+y<<endl;
  16. }
  17. }

1 comment:

  1. https://artisanal-builder-5141.ck.page/87f55a4a30

    ReplyDelete

Most View Post

Recent post

Codeforces Round 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h ...

Powered by Blogger.