734B - Anton and Digits

  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.  
  6. long long d2,d3,d5,d6;
  7. cin>>d2>>d3>>d5>>d6;
  8. long long mn= min( min(d2,d5),d6 );
  9.  
  10. long long mn2=min(d2-mn,d3);
  11.  
  12. long long ans = mn*256+mn2*32;
  13. cout<<ans;
  14. }

Comments

Popular posts from this blog

Codeforce Problem 1703A. YES or YES?

1535A. Fair Playoff

Aptitude test assistant programmer 2018