Codeforces 1061A Coins Solution

Solve in C++:
  1. ///**********ALLAH IS ALMIGHTY************///
  2. ///AH Tonmoy
  3. ///Department of CSE,23rd batch
  4. ///Islamic University,Bangladesh
  5. #include<iostream>
  6. #include<math.h>
  7. using namespace std;
  8. int main()
  9. {
  10. long long int n,s,r;
  11. cin>>n>>s;
  12. if(s%n==0)
  13. cout<<s/n<<endl;
  14. else
  15. cout<<(s/n)+1<<endl;
  16. }

No comments

Most View Post

Recent post

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

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

Powered by Blogger.