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]))))
}

Python: # -*- coding: utf-8 -*-
L = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if A % C == 0:
    X = A // C
if A % C != 0:
    X = A // C + 1
if B % D == 0:
    Y = B // D
if B % D != 0:
    Y = B // D + 1
ans = L - max(X,Y)
print(ans)

Python: # coding: utf-8
# Your code here!
L=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())


if A%C==0 and B%D==0:
    X=A//C
    Y=B//D
    X,Y=sorted([X,Y])
    print(L-Y)
elif A%C==0 and B%D!=0:
    X=A//C
    Y=(B//D)+1
    X,Y=sorted([X,Y])
    print(L-Y)
elif A%C!=0 and B%D==0:
    X=(A//C)+1
    Y=B//D
else:
    X=(A//C)+1
    Y=(B//D)+1
    X,Y=sorted([X,Y])
    print(int(L-Y))

Python: a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

if b%d == 0:
  x = b // d
else:
  x = b // d +1

if c%e == 0:
  y = c // e
else:
  y = c // e +1

if x >= y:
  print(a-x)
else:
  print(a-y)

Python: l = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())

if a % c == 0:
    kokugo = a // c
else:
    kokugo = a // c + 1

if b % d == 0:
    sansu = b // d
else:
    sansu = b // d + 1

print(l - max(kokugo, sansu))

Python: l=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())

aa=a//c
if a%c!=0:
    aa+=1
bb=b//d
if b%d!=0:
    bb+=1
if aa>bb:
    print(l-aa)
else:
    print(l-bb)

Python: l = int(input()) # 冬休みの日数
a = int(input()) # 国語ページ数
b = int(input()) # 算数ページ数
c = int(input()) # 国語消化
d = int(input()) # 算数消化

import math

print(l - max(math.ceil(a/c), math.ceil(b/d)))

Python: #A
import math
L = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())

print(L-max(math.ceil(A/C),math.ceil(B/D)))

Python: import sys
import math
l=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
j_day=a//c
j_amr=a%c
if(j_amr != 0):
    j_day=j_day+1
m_day=b//d
m_amr=b%d
if(m_amr != 0):
    m_day=m_day+1
if(j_day>=m_day):
    study_day=j_day
else:
    study_day=m_day
day=l-study_day
print(day)

Python: import math
a = [int(input()) for i in range(5)]
b = sorted([math.ceil(a[1]/a[3]),math.ceil(a[2]/a[4])])
print(a[0]-b[-1])

Python: from math import ceil
f = lambda:int(input())
L = f();A = f();B = f();C = f();D = f()
days = max(ceil(A / C) ,ceil(B / D))
print(L-days)

Python: # AOJ 0576: Homework
# Python3 2018.6.30 bal4u

L, A, B, C, D = [int(input()) for i in range(5)]
a, b = (A-1)//C+1, (B-1)//D+1
if b > a: a = b
print(L-a)

Python: l=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
if a%c==0 and b%d==0:
  if a/c>=b/d:
    print(l-(a//c))
  else:
    print(l-(b//d))
else:
  x=(a//c)+1
  y=(b//d)+1
  if x>=y:
    print(l-x)
  else:
    print(l-y)

Python: l = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())

print(l - max(a // c + 1 if a % c else a // c, b // d + 1 if b % d else b // d))

Python: import math

L = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())

print(L - max(math.ceil(a/c), math.ceil(b/d)))

Python: import math
def main():
    L = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())

    hoge = math.ceil(A / C)
    fuga = math.ceil(B / D)

    if hoge >= fuga:
        print(L - hoge)
    else:
        print(L - fuga)


if __name__ == "__main__":
    main()

Python: L=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
print(L-max((A+C-1)//C,(B+D-1)//D))

Python: l=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
if a%c==0 or b%d==0:
  if a/c>=b/d:
    print(l-(a//c))
  else:
    print(l-(b//d))
else:
  x=(a//c)+1
  y=(b//d)+1
  if x>=y:
    print(l-x)
  else:
    print(l-y)

Python: import math
l=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(l-max(math.ceil(a/c),math.ceil(b/d)))

Python: while True:
  l=int(input())
  a=int(input())
  b=int(input())
  c=int(input())
  d=int(input())
  if a%c==0 and b%d==0:
    if a/c>=b/d:
      print(l-(a//c))
    else:
      print(l-(b//d))
  else:
    x=(a//c)+1
    y=(b//d)+1
    if x>=y:
      print(l-x)
    else:
      print(l-y)

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0576

"""
import sys
from sys import stdin
from math import ceil
input = stdin.readline


def main(args):
    L = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())

    days_to_finish_A = ceil(A / C)
    days_to_finish_B = ceil(B / D)
    print(L - max(days_to_finish_A, days_to_finish_B))


if __name__ == '__main__':
    main(sys.argv[1:])

Python: # coding: utf-8

import math

L, A, B, C, D = [int(input()) for i in range(5)]
print(L - max(math.ceil(A/C), math.ceil(B/D)))

Python: n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(int(n-max(a/c,b/d)))

Python: L,jp,mp,j,m=[int(input())for i in range(5)]
print(int(L-max([jp/j,mp/m]))//1)

Python: L, A, B, C, D = [int(input()) for _ in range(5)]
print(L - max(-(-A // C), -(-B // D)))

Python: L = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())

print(L - max((A+C-1) // C, (B+D-1) // D))

Python: L = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())

if A % C == 0 :
    Kokugo = A // C
else :
    Kokugo = A // C + 1
if B % D == 0 : 
    Math = B // D
else :
    Math = B // D + 1
print(L - max(Kokugo, Math))

Python: l=int(input())

a=[]

for i in range(4):
    x=int(input())
    a.append(x)
r1=0
r2=0

if a[0]%a[2]==0:
    r1=a[0]//a[2]
else:
    r1=a[0]//a[2]+1

if a[1]%a[3]==0:
    r2=a[1]//a[3]
else:
    r2=a[1]//a[3]+1

print(l-max(r1,r2))

Python: a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
while b>0 or c>0:
        a-=1
        b-=d
        c-=e
print(a)

Python: L=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
if A//C>=B//D:
    if A%C==0:
        print(L-A//C)
    else:
        print(L-A//C-1)
else:
    if B%D==0:
        print(L-B//D)
    else:
        print(L-B//D-1)

Python: int_list = []
for num in range(5):
    num1 = int(input())
    int_list.append(num1)
num2 = int_list[1] // int_list[3] + 1
num3 = int_list[2] // int_list[4] + 1
if num2 > num3:
    if int_list[1] % int_list[3] == 0:
        num2 -= 1
        i = int_list[0] - num2
    else:
        i = int_list[0] - num2
else:
    if int_list[2] % int_list[4] == 0:
        num3 -= 1
        i = int_list[0] - num3
    else:
        i = int_list[0] - num3
print(i)

Python: import math

l = [int(input()) for i in range(5)]
d = max( math.ceil(l[1]/l[3]), math.ceil(l[2]/l[4]))
print(l[0]-d)

Python: L = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())

day_k = 0
day_s = 0
if A % C == 0:
    day_k = A // C
else:
    day_k = A // C + 1
if B % D == 0:
    day_s = B // D
else:
    day_s = B // D + 1

print(L - max(day_k, day_s))

Python: import math
re_day = int(input())
ko_hom = int(input())
ma_hom = int(input())
ko_sp = int(input())
ma_sp = int(input())
print(re_day - math.ceil(max(ko_hom/ko_sp,ma_hom/ma_sp)))

Python: L,A,B,C,D = [int(input()) for _ in range(5)]
print(L - max((A - 1) // C,(B - 1) // D) - 1)