#include<bits/stdc++.h>
using namespace std;
long long n,q,h,s,d,minn,maxn,ans;
int main()
{
scanf("%d%d%d%d%d",&q,&s,&h,&d,&n);
minn=min(q*4,min(s*2,h));
maxn=min(min(q*8,s*4),min(h*2,d));
ans=(n%2?(n-1)*maxn/2+minn:n*maxn/2);
printf("%lld\n",ans);
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:6:36: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
scanf("%d%d%d%d%d",&q,&s,&h,&d,&n);
^
./Main.cpp:6:36: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=]
./Main.cpp:6:36: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘long long int*’ [-Wformat=]
./Main.cpp:6:36: warning: format ‘%d’ expects argument of type ‘int*’, but argument 5 has type ‘long long int*’ [-Wformat=]
./Main.cpp:6:36: warning: format ‘%d’ expects argument of type ‘int*’, but argument 6 has type ‘long long int*’ [-Wformat=]
./Main.cpp:6:37: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d%d",&q,&s,&h,&d,&n);
^