Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextFloat64() (float64, error) {
	return strconv.ParseFloat(nextString(), 64)
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := 5
	array := make([]float64, n)
	for i := 0; i < n; i++ {
		array[i], _ = nextFloat64()
	}

	// fmt.Println(array)
	fmt.Println(int(array[0] - math.Ceil(math.Max(array[1]/array[3], array[2]/array[4]))))
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){

	int l;
	int a,b,c,d;

    cin>>l;
    cin>>a>>b>>c>>d;
    int o,p;
    if(a%c==0)o=a/c;
    else o=a/c+1;
    if(b%d==0)p=b/d;
    else p=b/d+1;
    int m=max(o,p);

    cout<<l-m<<endl;

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <random>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int a,b,c,d,e; cin >> a >> b >> c >> d >> e;
	cout << a-max((b+d-1)/d,(c+e-1)/e) << endl;
}

C++: #include<iostream>
using namespace std;
     
int main()
{
int L,A,B,C,D,K,E,F;
cin>>L>>A>>B>>C>>D;
E=A/C;
F=B/D;
if(A%C>0){
E+=1;
}
if(B%D>0){
F+=1;
}
if(E<F){
K=L-E;
}
else(E>F)
K=L-F;
cout<<K<<'\n';
return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int l,a,b,c,d,x,y,z;
	scanf("%d %d %d %d %d",&l,&a,&b,&c,&d);
	x=a/c;
	if(a%c>0){
		x+=1;
	}
	y=b/d;
	if(b%d>0){
		y+=1;
	}
	if(x>y){
		z=l-x;
	}
	else{
		z=l-y;
	}
	printf("%d\n",z);
	return 0;
}

C++: //13-1 ??????
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
using namespace std;
int main(){
    int L,A,B,C,D;
    cin >> L >> A >> B >> C >> D;
    while(A>0||B>0){
        L--;
        A -= C;
        B -= D;
    }
    cout << L << endl;
    return 0;
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <unordered_map>
constexpr int MOD = 1000000000 + 7;
constexpr int INF = 2000000000;
using namespace std;
using LL = long long;
 
int main() {
	int l, a, b, c, d;
	cin >> l >> a >> b >> c >> d;
	int k = a / c + (a%c == 0 ? 0 : 1);
	int m = b / d + (b%d == 0 ? 0 : 1);
	cout << l - max(k, m) << endl;
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
using namespace std;
int main()
{
	int l,a,b,c,d;
	cin >> l >> a >> b >> c >> d;
	int x,y;
	if(a%c==0)x=a/c;
	else x=a/c+1;
	if(b%d==0)y=b/d;
	else y=b/d+1;
	cout << l-max(x,y) << "\n";
	return 0;
}

C++: #include<iostream>

int main(){
	int l,a,b,c,d;
	std::cin>>l>>a>>b>>c>>d;
	int e=a/c,f=b/d;
	if(a%c!=0)e+=1;
	if(b%d!=0)f+=1;
	std::cout<<std::min(l-e,l-f)<<std::endl;
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define erep(i,a,b) for(int i=a;i<=(int)(b);++i)
#define per(i,a,b) for(int i=(a);i>(b);--i)
#define eper(i,a,b) for(int i=(a);i>=b;--i)
#define pb push_back
#define mp make_pair
#define INF 100100100100
#define MOD 1000000007
#define ALL(x) begin(x),end(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
typedef vector<int> vii;
typedef vector<ll> vll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a, b)*b;}

int a, b, c, d;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
    int l;
    cin >> l;
    cin >> a >> b >> c >> d;
    int day_a = a % c == 0 ? a / c : a / c + 1;
    int day_b = b % d == 0 ? b / d : b / d + 1;
    cout << l - max(day_a, day_b) << endl;
    return 0;
}

C++: #include <iostream>
int f(int  a,int b,int c,int d){
    if(a/c+1>=b/d+1){
        if(a%c==0)
        return a/c;
        else return a/c+1;
    }else if(b%d==0){
        return b/d;
    }else return b/d+1;
}
int main(){
    int a,b,c,d,e;
    std::cin>>a>>b>>c>>d>>e;
    std::cout<<a-f(b,c,d,e)<<std::endl;
    return 0;
}

C++: #include <stdio.h>
#include <cctype>
#include <limits.h>
#include <math.h>
#include <complex>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) static_cast<bitset<16> >(x);
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 1000000000;
const double EPS = 1e-8;
const double PI = 3.14159;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0576 : Homework **/
int main()
{
	int L, A, B, C, D;
	cin>>L>>A>>B>>C>>D;
	int t = max(ceil((double)A/C), ceil((double)B/D));
	cout << L-t << endl;
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
int main() {
	int L, A, B, C, D; cin >> L >> A >> B >> C >> D;
	int a = (A + 1) / C+1;
	int b = (B + 1) / D + 1;
	cout << L - max(a, b) << endl;
	return 0;
}

C++: #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    int tino,tiya,kokoa,rize,syaro;
    cin>>tino>>tiya>>kokoa>>rize>>syaro;
    cout<<tino-max((int)((double(tiya)/rize)+1),(int)((double)(kokoa/syaro)+1))<<endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
#define INF LLONG_MAX
typedef long long ll;

int solve()
{
	int L, A, B, C, D;
	cin >> L >> A >> B >> C >> D;
	return L - max((A+(C-1))/C, (B+(D-1))/D);
}

int main(void)
{
	int ans = solve();
	cout << ans << endl;
}

C++: #include<iostream>
using namespace std;

int main(){

	int a,b,c,d,l,x,y,z;
	cin >> l >> a >> b >> c >> d;

	if( a%c > 0 ){
		x = a/c+1;
	}
	else{
		x = a/c;
	}
	if( b%d > 0 ){
		y = b/d+1;
	}
	else{
		y = b/d;
	}

	z = max( x , y );
	
	cout << l-z << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  int l,a,b,c,d;

  cin >>l>>a>>b>>c>>d;


  if ((a+c-1)/c>(b+d-1)/d){
    cout << l-((a+c-1)/c);
  }else{
    cout << l-((b+d-1)/d);
  }
  cout <<endl;

  return 0;
}