Created
October 2, 2018 07:38
-
-
Save lapla-cogito/a2001dd332947262373f7740c32ccbc7 to your computer and use it in GitHub Desktop.
AGC019A
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main(){ | |
long long int a,b,c,d,e; | |
cin>>a>>b>>c>>d>>e; | |
long long ans=min(e*4*a,min(e*2*b,e*c)); | |
cout<<min(e/2*d+e%2*ans/e,ans)<<endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment