fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n, k, l, c, d, p, nl, np;
  6. cin >> n >> k >> l >> c >> d >> p >> nl >> np;
  7.  
  8. int totalDrink = k * l;
  9. int totalLimes = c * d;
  10. int toasts = min({totalDrink / nl, totalLimes, p / np}) / n;
  11.  
  12. cout << toasts << endl;
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
0