Codeforces 746A. Compote Solution

Solve in C++:
  1. ///**********ALLAH IS ALMIGHTY************///
  2. ///AH Tonmoy
  3. ///Department of CSE
  4. ///Islamic University,Bangladesh
  5. #include<iostream>
  6. using namespace std;
  7. int main()
  8. {
  9. int a,b,c,s;
  10. while(cin>>a>>b>>c)
  11. {
  12. s=min(a,min(b/2,c/4));
  13. cout<<1*s+2*s+4*s<<endl;
  14. }
  15. }

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.