CodeForce Compt Soln

                                        Codeforces Round #107 (Div. 2)

                                     A. Soft Drinking
 This winter is so cold in Nvodsk! A group of n friends decided to buy k bottles of a soft drink called "Take-It-Light" to warm up a bit. Each bottle has l milliliters of the drink. Also they bought c limes and cut each of them into d slices. After that they found p grams of salt.

To make a toast, each friend needs nl milliliters of the drink, a slice of lime and np grams of salt. The friends want to make as many toasts as they can, provided they all drink the same amount. How many toasts can each friend make?
Input
The first and only line contains positive integers nklcdpnlnp, not exceeding 1000 and no less than 1. The numbers are separated by exactly one space.
Output
Print a single integer — the number of toasts each friend can make.



#include<iostream>
#include<vector>
#include<stdio.h>
#include<stdlib.h>
#include<queue>
#include<list>
#define show(x) copy(x.begin(),x.end(),output)
#include<iterator>
#define sort(x) sort(x.begin(),x.end())
#include<string>
#define vs vector<string>
#define vi vector<int>
#define pb push_back
#include<map>
#include<algorithm>
#include<sstream>
#include<stack>
#include<cmath>
#include<cstring>
#include<iomanip>
#include<cctype>
using namespace std;

int main()
{
    int n = 0 , k = 0 , l = 0 , c = 0 , d = 0 , p = 0 , nl = 0 , np = 0 ;
    cin>>n;
    cin>>k;
    cin>>l;
    cin>>c;
    cin>>d;
    cin>>p;
    cin>>nl;
    cin>>np;
    int dl = k * l;
    dl =  int(dl / nl);
    c = c * d;
    p = (int)(p / np);
    if( dl < c && dl < p )
    {
        cout<<dl/n<<endl;
    }
    else if( c < dl && c < p )
    {
         cout<<c/n<<endl;
    
    }
    else
    {
        cout<<p/n<<endl;
    }
    
    return 0;
}   

BY: SAURABH BHATIA(GNDU , RC JAL)