#include <bits/stdc++.h>
//NOI 2018 PRELIMS
#define ll long long int
#define endl '\n'
#define vn vector <ll>
using namespace std;
const int MAX_N = 1e9 + 7;
#define pii pair <ll,ll>
const ll INF = 0x3f3f3f3f3f3f3f3f;
#define pb push_back
#define srt(vp) sort(vp.begin(), vp.end())
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll s,n;
cin>>s>>n;
ll a,b,c;
cin>>a>>b>>c;
ll ans = s/b;
if (ans < 1){
ans=0;
cout<<0<<endl;
return 0;
}
else{
ans = min(ans,c);
ans *= a;
cout<<ans<<endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |