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 <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;
    int gotiusa=0;
    int aoayama=0;
    cout<<tino-max((int)(double(tiya)/rize+0.5),(int)((double)(kokoa/syaro)+0.5))<<endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
	int l,a,b,c,d,p,q,ans;
	cin>>l>>a>>b>>c>>d;
	p=a/c;a=a%c;p+=(a)?1:0;
	q=b/d;b=b%d;q+=(b)?1:0;
	cout<<l-((p>q)?p:q)<<endl;
	return 0;
}

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

int l, a, b, c, d;

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

C++: #include <iostream>

using namespace std;

int main()
{
  int winter;
  int japanese;
  int math;
  int j_perday;
  int m_perday;

  cin>>winter>>japanese>>math>>j_perday>>m_perday;

  for(int i=0;i<winter;i++){
    if(j_perday*i>=japanese && m_perday*i>=math){
      cout<<winter-i<<endl;
      break;
    }
  }

}

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

int main() {
  int L, a, b, c, d;
  cin >> L >> a >> b >> c >> d;
  int t = max((a + c - 1) / c, (b + d - 1) / d);
  cout << L - t << "\n";
}

C++: #include <iostream>

using namespace std;

int main(){
	int day, a, b, a1, b1, x, y;
	cin >> day >> a >> b >> a1 >> b1;

	x = a / a1;
	y = b / b1;

	if (a % a1 != 0) x += 1;
	if (b % b1 != 0) y += 1;

	if (x > y) cout << day - x << endl;
	else cout << day - y << endl;

	return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;

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

int calc(int x, int y) {
    return x%y==0?x/y:x/y+1;
}

int main() {
    scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);
    m = max(calc(a,c),calc(b,d));
    printf("%d\n",l-m);
}

C++: #include <iostream>

using namespace std;

int main(void){
  int L , A , B , C , D;
  cin >> L >> A >> B >> C >> D;

  int days_jp , days_mt , days;
  days_jp = (A / C) + 1;
  days_mt = (B / D) + 1;
  days = (days_jp > days_mt) ?  days_jp : days_mt;

  cout << L - days << endl;

  return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <math.h>
using namespace std;

int main() {
	int day;
	double a[4];

	scanf("%d", &day);
	for (int i = 0; i < 4; i++) {
		scanf("%lf", &a[i]);
	}

	double temp1, temp2;
	temp1 = ceil(a[0] / a[2]);
	temp2 = ceil(a[1] / a[3]);

	printf("%d\n", day - (int)max(temp1, temp2));

	return 0;
}

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

int main(){
  double L, A, B, C, D;
  cin >> L >> A >> B >> C >> D;
  cout << L - ceil(A/C) - ceil(B/D) << endl;
}

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

using namespace std;

int L, A, B, C, D;

int main()
{
    cin >> L >> A >> B >> C >> D;
    int kokugo = A / C;
    int sansuu = B / D;

    if (A % C != 0)
        kokugo++;
    if (B % C != 0)
        sansuu++;

    cout << L - max(kokugo, sansuu) << endl;

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int L,A,B,C,D,AC,BD;
    cin>>L>>A>>B>>C>>D;
    if(A%C==0)AC=L-(A/C);
    else AC=L-(A/C+1);
    if(B%D==0)BD=L-(B/D);
    else BD=L-(B/D+1);
    if(AC<BD)cout<<AC<<endl;
    else cout<<BD<<endl;
}

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

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+1, san+1);
	
	std::cout << l << std::endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){
  int L , A , B , C , D;
  cin >> L >> A >> B >> C >> D;

  int days_jp , days_mt , days;
  days_jp = (A % C == 0) ? (A / C) : (A / C) + 1;
  days_mt = (B % D == 0) ? (B / D) : (B / D) + 1;
  days = (days_jp > days_mt) ?  days_jp : days_mt;

  cout << L - days << endl;

  return 0;
}

C++: #include<iostream>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

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 l, a, b, c, d;
int main()
{
  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>
using namespace std;

int divu(int x, int y){
    if( x % y == 0)
        return x / y;
    else
        return x / y + 1;
}

int main(){
    int l, a, b, c, d;
    cin >> l >> a >> b >> c >> d;
    cout << l - max( divu(a, c), divu(b, d) ) << endl;
    return 0;
}

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

C++: #include<stdio.h>
#include<math.h>
#include<algorithm>
#include<cctype>
#include<string.h>
#include <stdlib.h>

#define PI 3.1415926
void swap(int* x, int* y) {
	int a = *x;
	int b = *y;
	*x = b;
	*y = a;
}
int factorial(int n);
int sum(int n, int*);
int ave(int n, int*);
int min(int n, int*), min(int n, int m);
int max(int n, int*), max(int n, int m);

int main() {
	int L, A, B, C, D;
	scanf("%d %d %d %d %d", &L, &A, &B, &C, &D);
	printf("%d\n", L - max(A / C, B / D));
	return 0;
}

int factorial(int n) {
	if (n > 0) {
		return n * factorial(n - 1);
	}
	else {
		return 1;
	}
}
int sum(int n, int *all) {
	int total = 0;
	for (int i = 0; i < n; ++i) {
		total += all[i];
	}
	return total;
}
int ave(int n, int *all) {
	int total = 0;
	for (int i = 0; i<n; ++i) {
		total += all[i];
	}
	return total / n;
}
int min(int n, int *all) {

	int min = all[0];
	for (int i = 1; i < n; ++i) {
		if (all[0] > all[i]) {
			min = all[i];
		}
	}
	return min;
}
int max(int n, int *all) {
	int max = all[0];
	for (int i = 1; i<n; ++i) {
		if (all[0]<all[i]) {
			max = all[i];
		}
	}
	return max;
}
int max(int n, int m) {
	if (n >= m) {
		return n;
	}
	else {
		return m;
	}
}
int min(int n, int m) {
	if (n >= m) {
		return m;
	}
	else {
		return n;
	}
}