Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include<bits/stdc++.h>
using namespace std;
int main(){
int n, k, l, c, d, p, nl, np;
cin>>n>>k>>l>>c>>d>>p>>nl>>np;
int a = (k*l)/nl;
int b = c * d;
int s = p / np;
if( a <= b && a <= s){
cout<<(a/n)<<endl;
return 0;
}
if(b <= a && b <= s){
cout<<(b/n)<<endl;
return 0;
}
cout<<(s/n)<<endl;
return 0;
}
Copy The Code &
Try With Live Editor
Input
3 4 5 10 8 100 3 1
Output
2
Demonstration
Codeforcess Solution 151-A A. Soft Drinking ,C++, Java, Js and Python,151-A,Codeforcess Solution