fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n,k,l,c,d,p,nl,np;
  7. cin>>n>>k>>l>>c>>d>>p>>nl>>np;
  8. int a,b,q;
  9. a=(k*l)/nl;
  10. b=c*d;
  11. q=p/np;
  12. int z=min(a,b);
  13. cout<<min(z,q)/n<<"\n";
  14. return 0;
  15. }
Success #stdin #stdout 0s 5516KB
stdin
5 100 10 1 19 90 4 3
stdout
3