Codeforces Soft Drinking
/*
Lionel Messi is such a player that you may catch him, you may touch him, you may feel him
and definitely you may Love him.
Lionel Messi is Messi. A little Magician in this World.
*/
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0)
#define bfast cin.tie(0)
#define outs(x) cout << x << " "
#define outn(x) cout << x << "\n"
#define sf scanf
#define pf printf
#define nl puts("")
#define psb push_back
#define loop0(n) for(int i=0; i<n; i++)
#define loop1(n) for(int i=1; i<=n; i++)
#define mpair(x , y) make_pair(x , y)
#define all(x) x.begin(), x.end()
#define pi acos(-1.0)
typedef unsigned long long ull;
typedef long long LL;
int main()
{
fast;
LL n , k , l , c , d , p , Nl , Np , drink=0 , limes=0 , salt=0;
while(cin >> n >> k >> l >> c >> d >> p >> Nl >> Np)
{
drink = (k * l) / Nl;
limes = c * d;
salt = p / Np;
LL ans = min(drink , limes);
ans = min(ans , salt);
ans/=n;
outn(ans);
}
return 0;
}
Lionel Messi is such a player that you may catch him, you may touch him, you may feel him
and definitely you may Love him.
Lionel Messi is Messi. A little Magician in this World.
*/
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0)
#define bfast cin.tie(0)
#define outs(x) cout << x << " "
#define outn(x) cout << x << "\n"
#define sf scanf
#define pf printf
#define nl puts("")
#define psb push_back
#define loop0(n) for(int i=0; i<n; i++)
#define loop1(n) for(int i=1; i<=n; i++)
#define mpair(x , y) make_pair(x , y)
#define all(x) x.begin(), x.end()
#define pi acos(-1.0)
typedef unsigned long long ull;
typedef long long LL;
int main()
{
fast;
LL n , k , l , c , d , p , Nl , Np , drink=0 , limes=0 , salt=0;
while(cin >> n >> k >> l >> c >> d >> p >> Nl >> Np)
{
drink = (k * l) / Nl;
limes = c * d;
salt = p / Np;
LL ans = min(drink , limes);
ans = min(ans , salt);
ans/=n;
outn(ans);
}
return 0;
}
Comments
Post a Comment