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>
using namespace std;

int main()
{
 int l,a,b,c,d,x,y;
 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;}
 if(x>y)
    cout<<l-x;
 else
    cout<<l-y;
 return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main()
{
	int L, A, B, C, D;
	cin >> L >> A >> B >> C >> D;
	cout << L - max((A + C - 1) / C, (B + D - 1) / D) << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>
int main() {
	int l; // ??¬???????????\??°
	int a, b, c, d;
	int koku, san;
	std::cin  >> l >> a >> b >> c >> d;
	koku = b / d;
	san = a / c;

	l = l - std::max(koku, san);
	
	std::cout << l << std::endl;

	return 0;
}

C++: #include <bits/stdc++.h>

typedef long long ll;
using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

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

	cout << min(l-((a-1)/c+1),l-((b-1)/d+1)) << endl;;

	return 0;

}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
	
	int day, ja, math, doja, doma;
	int cnt_m = 0;
	int cnt_j = 0;
	cin >> day >> ja >> math >> doja >> doma;


	while(ja > 0){
		ja -= doja;
		cnt_j++;
	}
	while(math > 0){
		math -= doma;
		cnt_m++;
	}
	cout << day-max(cnt_m, cnt_j) << endl;
	

	return 0;
}

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

int main () {
	int a,b,c,d,L;
	int hi,tuki;
	float fhi,ftuki;
	cin >> L >> a >> b >> c >> d;
	hi=a/c;
	fhi=(float)a/c;
	tuki=b/d;
	ftuki=(float)b/d;
	if(hi<fhi){
		thi++;
		}
	if(tuki<ftuki){
		ftuki++;
		}
	if(hi>tuki){
		cout << L-hi <<'\n';
	}else{
		cout << L-tuki <<'\n';
	}
	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<string>

using namespace std;
int main()
{
    int l,a,b,c,d;
    cin >> l >> a >> b >> c >> d;
    int max=0;
    if(a%c==0){
        max=a/c;
    }else{
        max=a/c+1;
    }
    if(b%d==0){
        if(max<(b/d)){
            max=b/d;
        }
    }else{
        if(max<(b/d+1)){
            max=b/d+1;
        }
    }
    
    cout << l-max << endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	int a,b,c,d,e,f,g,h,i,j,k;
	float A;
	cin>>a>>b>>c>>d>>e;
	A=b-d;
	f=0;
	f++;
	for (;;)
	{
		A=A-d;
		if(A>0)
		{
			f++;
		}
		else if (A<=0)
		{
			f++;
			break;
		}
	}
	A=c-e;
	f=0;
	f++;
	for (;;)
	{
		A=A-e;
		if (A>0)
		{
			f++;
		}
		else if (A<=0)
		{
			f++;
			break;
		}
	}
	if (f<=g)
	{
		g=a-g;
		cout<<g<<endl;
	}
	else if(f>=g)
	{ 
		f=a-f;
		cout<<f<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

  int L,A,B,C,D,count = 0;

  cin >> L >> A >> B >> C >> D;


 for(; ;){

   if( A <= 0 && B <= 0)  break;

   A -= C;
   B -= D;

   count++;

 }

 cout << L - count << endl;

 return 0;

}

C++: #include <iostream>

using namespace std;

int main(){

	int l , a , b , c , d;
	int ans = 0 , ans2 = 0;
	cin >> l >> a >> b >> c >> d;

	if((a % c) == 0){
		ans += a / c;
	}else{
		ans += a / c + 1;
	}if((b % d) == 0){
		ans2 += a / c;
	}else{
		ans2 += a / c + 1;
	}

	if(ans < ans2) cout << l - ans2 << endl;
	else cout << l - ans << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
#define MOD 1000000007
#define INF (1 << 30)
#define REP(i, m, n) for(int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)


signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int l, a, b, c, d; cin >> l >> a >> b >> c >> d;
    cout << l - max((a+c-1)/c, (b+d-1)/d) << '\n';
    return 0;
}

C++: #include<cstdio>
int main(){
    int n,ja,ma,japd,mapd,jad,mad,bigd;
    scanf("%d%d%d%d%d",&n,&ja,&ma,&japd,&mapd);
    jad=ja/japd+1;
    if(ja%japd==0)
        jad--;
    mad=ma/mapd+1;
    if(ma%mapd==0)
        mad--;
    if(jad<mad)
        bigd=mad;
    else
        bigd=jad;
    printf("%d",n-bigd);
    return 0;
}

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

int main(void) {
	int k, a, b, c, d;
	int i, j;
	cin >> k >> a >> b >> c >> d;

	for (i = 0; a > 0; a -= c,i++);
	for (j = 0; b > 0; b -= d,j++);
	if (i > j) cout << k - i << endl;
	else cout << k - j << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int l,a,b,c,d;
  cin>>l>>a>>b>>c>>d;
  cout<<l-max((a+c-1)/c,(b+d-1)/d)<<endl;
  return 0;
}

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

int main()
{
int L,A,B,C,D,K,E,F,G,H;
cin>>L>>A>>B>>C>>D;
E=A/C;
F=B/D;
G=A%C;
H=B%D;
if(E<F){
if(G>0){
E+=1;
}
if(H>0){
F+=1;
}
K=L-E;
}
if(E>F){
if(G>0){
E+=1;
}
if(H>0){
F+=1;
}
K=L-F;
}
if(E=F){
if(G>0){
E+=1;
}
if(H>0){
F+=1;
}
K=L-E;
}
cout<<K<<'\n';
return 0;
}

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

int main() {
	int L, A, B, C, D;
	int finJP, finMath;
	int i = 0;

	cin >> L;
	cin >> A;
	cin >> B;
	cin >> C;
	cin >> D;

	if (A%C > 0) {
		finJP = A / C + 1;
	}
	else {
		finJP = A / C;
	}
	if (B%D > 0) {
		finMath = B / D + 1;
	}
	else {
		finMath = B / D;
	}
	if (finJP < finMath) {
		cout << L - finMath << endl;
	}
	else if (finJP > finMath) {
		cout << L - finJP << endl;
	}
	else {
		cout << L - finMath << endl;
	}

	return 0;
}

C++: #include <stdio.h>

int main(void){
int daze,J,M,doJ,doM;
int Jdaze,Mdaze;
scanf("%d%d%d%d%d",&daze,&J,&M,&doJ,&doM);
Jdaze = doJ * daze;
Mdaze = doM * daze;
Jdaze -= J;
Mdaze -= M;
Jdaze /= doJ;
Mdaze /= doM;
if(Mdaze > Jdaze)Mdaze = Jdaze;
printf("%d\n",Mdaze);
return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int A, B, C, D, L;
  int date_langue, date_math, date_play;
  int tmp;
  
  while(1){
    cin >> L >> A >> B >> C >> D;
    
    date_langue = A/C;

    tmp = A%C;
    if(tmp > 0)
      date_langue ++;

    date_math = B/D;
    tmp = B%D;
    if(tmp > 0)
      date_math ++;
 
    if(date_langue > date_math){
      date_play = L - date_langue;
    }else date_play = L - date_math;
    
    cout << date_play << endl;
  }
}

C++: #include <iostream>

using namespace std;

int main() {
	int L, a, b, c, d;
	cin >> L >> a >> b >> c >> d;

	int kokugo = a / c;
	int sansuu = b / d;

	if (a % c != 0) {
		kokugo++;
	}
	if (b % d != 0) {
		sansuu++;
	}

	cout << (L - (kokugo > sansuu ? kokugo : sansuu)) << endl;

	return 0;
}

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

C++: #include<iostream>
using namespace std ;
int main( void )
{
	short holy ;
	short jap ,math ;
	short japrite ,mathrite ;
	short amari ;
	cin >> holy ;
	cin >> jap ;
	cin >> math ;
	cin >> japrite ;
	cin >>mathrite ;
	amari = jap % japrite > 0 ? 1 : 0 ;
	jap /= japrite + amari ;
	amari = math % mathrite > 0 ? 1 : 0 ;
	math /= mathrite + amari ;
	holy -= jap > math ? jap : math ;
	cout << holy << endl ;
	return 0 ;
}

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

int n, a, b, c, d;

int main()
{
    cin >> n >> a >> b >> c >> d;
    cout << n - max((a + c - 1) / c, (b + d - 1) / d) << endl;
}

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