#include <bits/stdc++.h>
using namespace std;
int main(){
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long long a,c,q,p,r,x,t;
cin>>a>>c>>p>>q>>r>>x;
t=a;
for(int i=a;i<c&&x>=p;i++)
{
t++;
x-=p;
}
if(x<=q)
{
cout<<t;
return 0;
}
x-=q;
for(int i=0;x>=r;i++)
{
t++;
x-=r;
}
cout<<t;
return 0;
}
这么水的暴力代码都能过,这数据得有多水。
@小粉兔