Problem:


Score : 100 points

Problem Statement

We have a grid with H rows and W columns, where all the squares are initially white.

You will perform some number of painting operations on the grid.
In one operation, you can do one of the following two actions:

Choose one row, then paint all the squares in that row black.

Choose one column, then paint all the squares in that column black.

At least how many operations do you need in order to have N or more black squares in the grid?
It is guaranteed that, under the conditions in Constraints, having N or more black squares is always possible by performing some number of operations.

Constraints

1 \leq H \leq 100

1 \leq W \leq 100

1 \leq N \leq H \times W

All values in input are integers.

Input

Input is given from Standard Input in the following format:

H
W
N

Output

Print the minimum number of operations needed.

Sample Input 1

3
7
10

Sample Output 1

2

You can have 14 black squares in the grid by performing the "row" operation twice, on different rows.

Sample Input 2

14
12
112

Sample Output 2

8

Sample Input 3

2
100
200

Sample Output 3

2



Sample input:
3
7
10


Sample output:
2

Submission status: Accepted

Solution code:
from math import ceil

H = int(input())
W = int(input())
N = int(input())

print(ceil(N/max(H,W)))

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
print((n//(-(max(h,w))))*(-1))

Submission status: Accepted

Solution code:
from math import ceil

h = int(input())
w = int(input())
n = int(input())

print(ceil(n / max(h, w)))

Submission status: Accepted

Solution code:
import math
A = int(input())
B = int(input())
N = int(input())
if A> B:
    print(math.ceil(N/A))
else:
    print(math.ceil(N/B))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

print((n+max(w,h) - 1) // max(w,h))

Submission status: Accepted

Solution code:
#A
import math
h = int(input())
w = int(input())
n = int(input())
if h < w:
    a = w
else:
    a = h
print(math.ceil(n/a))

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
if h>w:
  if n%h==0:
    print(n//h)
  else:
    print(n//h+1)
else:
  if n%w==0:
    print(n//w)
  else:
    print(n//w+1)

Submission status: Accepted

Solution code:
import math

h = int(input())
w = int(input())
n = int(input())
ans = 0
if h < w:
    ans = math.ceil(n/w)
else:
    ans = math.ceil(n/h)

print(ans)

Submission status: Accepted

Solution code:
import math
H = int(input())
W = int(input())
N = int(input())
ans = max([H,W])
fa = N/ans
print(math.ceil(fa))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

ans = 0
m = max([H, W])
while N > 0:
    N -= m
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
print(-n//max(h,w)*-1)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    h=int(input())
    w=int(input())
    n=int(input())
    print(-(-n//max(h,w)))

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

from math import ceil
print(ceil(N/max(H,W)))

Submission status: Accepted

Solution code:
h, w, n = [int(input()) for _ in range(3)]
x = max(h, w)
print(-(-n // x))

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
k=max(H, W)
cnt=0
while k*cnt<N:
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
# KPC2020-A
def ceilT(a,b): #ceil(a/b)
    return (a+b-1)//b
H=int(input())
W=int(input())
N=int(input())
e=max(H,W)
print(ceilT(N,e))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
cnt=wcnt=hcnt=0

while N>0:
    a = max(H-hcnt, W-wcnt)
    N -= a
    cnt+=1
    if a==W:
        H-=1
        hcnt+=1
    elif a==H:
        W-=1
        wcnt+=1
print(cnt)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

from math import ceil
print(ceil(N/max(H,W)))

Submission status: Accepted

Solution code:
import math
a = int(input())
b = int(input())
n = int(input())
dum = max(a,b)
ans = n/dum
print(math.ceil(ans))

Submission status: Accepted

Solution code:
#A
h = int(input())
w = int(input())
n = int(input())

cnt = 0
flg = True
if h > w:
    while flg:
        if h * cnt >= n:
            flg = False
            break
        cnt += 1
        
else:
    while flg:
        if w * cnt >= n:
            flg = False
            break
        cnt += 1
        
print(cnt)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
print(-(-n//max(h,w)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
import math
print(math.ceil(n/max(h,w)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
s = max(h,w)
print((n+s-1)//s)

Submission status: Accepted

Solution code:
# キーエンス プログラミング コンテスト 2020: A – Painting
import math

h, w, n = [int(input()) for _ in range(3)]
a = max(h, w)
print(math.ceil(n / a))

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
c1=0
c2=0
t=0
while t<n:
  if h-c2<=w-c1:
    t+=w-c1
    c2+=1
  else:
    t+=h-c2
    c1+=1
print(c1+c2)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())-1
x=max(h,w)
print(n//x+1)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

import math

h = int(readline())
w = int(readline())
n = int(readline())
ans = min(math.ceil(n / h), math.ceil(n / w))
print(ans)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())         
if h>w:
  if n%h==0:
    ct=n//h
  else:
    ct=n//h+1
else:
  if n%w==0:
    ct=n//w
  else:
    ct=n//w+1
print(ct)

Submission status: Accepted

Solution code:
import math

h=[int(input())for _ in range(2)]
n=int(input())

print(math.ceil(n/max(h)))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

print((N + max(H, W) - 1) // max(H, W))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

ans = N // max(H, W)
if N % max(H, W) > 0:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
answer = 0
if H >= W:
    answer = N // H
    if N % H != 0:
        answer += 1
else:
    answer = N // W
    if N % W != 0:
        answer += 1
print(answer)

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    big = max(a,b)
    count =0
    if c % big > 0:
        count = c//big +1
    else:
        count = c//big
    

    print(count)

Submission status: Accepted

Solution code:
import math
h = int(input())
w = int(input())
n = int(input())
if h < w:
    h = w
print(math.ceil(n / h))

Submission status: Accepted

Solution code:
import math
h=int(input())
w=int(input())
n=int(input())
a=max(h,w)
print(math.ceil(n/a))

Submission status: Accepted

Solution code:
h, w, n = (int(input()) for i in range(3))
print(-(-n // max(h, w)))

Submission status: Accepted

Solution code:
import math


H,W,N = [int(input()) for i in range(3)]
 
print(min(math.ceil(N/H),math.ceil(N/W)))

Submission status: Accepted

Solution code:
#template
def inputlist(): return [int(j) for j in input().split()]
from collections import Counter
#template
#issueから始める
H=int(input())
W = int(input())
N = int(input())
m = max(H,W)
n=N/m
if n.is_integer():
    print(int(n))
    exit()
else:
    print(int(n)+1)

Submission status: Accepted

Solution code:
import math
H,W,N=int(input()),int(input()),int(input())
print(math.ceil(N/(max(H,W))))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
print(n//max(h,w)+1 if n%max(h,w) != 0 else n//max(h,w))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
ans = 0
if h >= w :
  if n%h != 0:
    ans = (n//h) +1
  else:
    ans = n//h
elif  w > h:
  if n%w != 0:
    ans  = (n//w) +1
  else:
    ans = n//w
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10000000)
from collections import defaultdict
from bisect import *
mod = 10**9+7

H = int(input())
W = int(input())
N = int(input())
h, w = max(H, W), min(H, W)
cnt, ans = 0, 0
while cnt < N:
    cnt += h
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

print(-(-n//max(h,w)))

Submission status: Accepted

Solution code:
div = 0
mod = 0

h = int(input())
w = int(input())
n = int(input())

if h > w:
  div = n // h
  mod = n % h
else:
  div = n // w
  mod = n % w

if mod > 0:
  print(div+1)
else:
  print(div)

Submission status: Accepted

Solution code:
import math
H = int(input())
W = int(input())
l = max([H, W])
N = int(input())
print(math.ceil(N/l))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

x = H if H>W else W
x2 = 0 if N%x==0 else 1

print(N//x + x2)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())

import math

s=max(h,w)
a=math.ceil(n/s)
print(a)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

if n % max(h, w) ==0:
  print(n//max(h,w))
else:
  print(n // max(h, w) + 1)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

hi = max(H, W)
print((N+hi-1)//hi)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
print(n // max(h,w)  + (1 if n%max(h,w) != 0 else 0))

Submission status: Accepted

Solution code:
import math
H = int(input())
W = int(input())
N = int(input())

print(math.ceil(N/(max(H, W))))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
ans = 0

while True:
    if h >= w:
        n = n - h
    else:
        n = n - w

    ans = ans + 1

    if n <= 0:
        break

print(ans)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

big = max(H,W)
bigsum = 0
ans = 0

while bigsum < N:
    bigsum += big
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
H=int(input());
W=int(input());
N=int(input());
print((N+max(H,W)-1)//max(H,W));

Submission status: Accepted

Solution code:
def resolve():
    a = int(input())
    b = int(input())
    c = int(input())
    d = max(a, b)
    print(((c-1)//d)+1)
resolve()

Submission status: Accepted

Solution code:
import numpy as np
import sys
h = int(input())
w = int(input())
n = int(input())
minhw = min(h,w)
maxhw = max(h,w)
cnt = 0
i = 0
while cnt<n:
    cnt += maxhw
    i += 1
print(i)

Submission status: Accepted

Solution code:
a = [int(input()) for _ in range(3)]
h, w = sorted([a[0], a[1]])
print(-((-a[2])//w))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
if n % max(h, w) == 0:
  print(n // max(h, w))
else:
  print(n // max(h, w) + 1)

Submission status: Accepted

Solution code:
import math
h = int(input())
w = int(input())
n = int(input())

t = max(h,w)
print(math.ceil(n/t))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

if n % max(h, w) == 0:
	print(n // max(h,w))
elif n % max(h,w) !=0 :
	print(n // max(h, w) + 1)

Submission status: Accepted

Solution code:
h, w, n = int(input()), int(input()), int(input())
print(-(-n//max(h, w)))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

p = -1
if H > W:
    p = H
else:
    p = W

count = 1
result = 1
while True:
    result = count * p
    if result >= N:
        print(count)
        break
    else:
        count += 1

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
if H>=W:
	if N%H==0:
		print(N//H)
	else:
		print(N//H+1)
else:
	if N%W==0:
		print(N//W)
	else:
		print(N//W+1)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
if h >= w:
    m = h
else:
    m = w
if n%m == 0:
    ans = n//m
else:
    ans = n//m +1
print(ans)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
x=max(h,w)
print((n+x-1)//x)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

X = max(H, W)
print((N + X - 1) // X)

Submission status: Accepted

Solution code:
from math import ceil


def main():
    width = int(input())
    height = int(input())
    lower_limit = int(input())
    print(ceil(lower_limit / max(width, height)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

if w > h:
    h, w = w, h

print((n+h-1)//h)

Submission status: Accepted

Solution code:
h,w,n=int(input()),int(input()),int(input())
a=max(h,w)
print((n+a-1)//a)

Submission status: Accepted

Solution code:
import numpy as np

H = int(input())
W = int(input())
N = int(input())

print(int(np.ceil(N/max(H,W))))

Submission status: Accepted

Solution code:
l=[int(input()) for i in range(3)]

x=l[0]
y=l[1]
z=l[2]
if x<y:
	print(-(-z//y))
else:
	print(-(-z//x))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
N = int(input())
cnt, loop = 0, 0
while cnt < N:
  cnt += max(w, h)
  loop += 1
print(loop)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

total = h*w
kesu = max(h, w)

if n%kesu==0:
    print(n//kesu)
else:
    print(n // kesu + 1)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())

m=max(h,w)
if n%m==0:
  print(int(n/m))
else:
  print(int(n/m+1))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

r = max(h,w)
count = 0
x = 0
while x < n:
    count += 1
    x += r

print(count)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
print(-(-N//max(H, W)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

if h >= w:
  if n%h == 0:
    print(str(n//h))
  else:
    print(str(n//h+1))
else:
  if n%w == 0:
    print(str(n//w))
  else:
    print(str(n//w+1))

Submission status: Accepted

Solution code:
# import bisect
from collections import Counter, defaultdict, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    h, w, n = map(int, open(0).read().split())

    print(math.ceil(n/max(h, w)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
use=max(h,w)
if n%use==0:
    print(n//use)
else:
    print(1+n//use)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

r = max(h,w)
count = 0
mass = 0
while mass < n:
    count += 1
    mass += r

print(count)

Submission status: Accepted

Solution code:
import math

H = int(input())
W = int(input())
N = int(input())

Max = max(H,W)

print(math.ceil(N/Max))

Submission status: Accepted

Solution code:
import math

h = int(input())
w = int(input())
n = int(input())

print(math.ceil(n / max(h, w)))

Submission status: Accepted

Solution code:
from math import ceil
H=int(input())
W=int(input())
N=int(input())
print(min(ceil(N/H),ceil(N/W)))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

if H < W:
    H, W = W, H

ans = 0
while N > 0:
    N -= H
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

h = int(input())
w = int(input())
n = int(input())
x = max(h,w)
print(int(np.ceil(n/x)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
j = 0
k = 1
if h > w:
  j = h
else:
  j = w
while n > j:
  n = n - j
  k = k + 1
print(k)

Submission status: Accepted

Solution code:
import math
from collections import deque
def main():
    h = int(input())
    w = int(input())
    n = int(input())

    times = n//max([h,w])+(0 if n%max([h,w])==0 else 1)

    print(times)
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

print(int((n-1) / max(h,w))+1)

Submission status: Accepted

Solution code:
# A
import math
H = int(input())
W = int(input())
N = int(input())

print(math.ceil(N / max(H, W)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

ans = 0
max = max(h, w)
while n > 0:
  n -= max
  ans += 1

print(ans)

Submission status: Accepted

Solution code:
import math
h = int(input())
w = int(input())
n = int(input())
print (math.ceil(n/max(h, w)))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())


print(-(-N//max(H, W)))

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
p=max(h,w)
print(n//p+(n%p!=0))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

MAX = max(h, w)

if n % MAX == 0:
    print(n // MAX)
else:
    print(n // MAX + 1)

Submission status: Accepted

Solution code:
import math
h,w,n=[int(input()) for _ in range(3)]
print(math.ceil(n/max(h,w)))

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
ans=min((n+h-1)//h,(n+w-1)//w)
print(ans)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

a = max(H, W)
print((N+a-1)//a)

Submission status: Accepted

Solution code:
import math
H=int(input());W=int(input());N=int(input());
print(math.ceil(N/max(H,W)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

if n % max(h, w) == 0:
    print(int(n//max(h, w)))
else:
    print(int(n//max(h, w))+1)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

print(int((N+max(H,W)-1)/max(H,W)))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

n = max(H, W)
ans = 1

while True:
    if n >= N:
        break

    n += max(H, W)
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
import math

h = int(input())
w = int(input())
n = int(input())
print(min(math.ceil(n / h), math.ceil(n / w)))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

max = max(H, W)

if N % max == 0:
  print(N // max)
else:
  print(N // max + 1)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
M = max(H, W)
if N % M == 0:
  print(N // M)
else:
  print((N // M) + 1)

Submission status: Accepted

Solution code:
h,w,n=map(int,open(0));print(0--n//max(h,w))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

if H > W:
    if N % H == 0:
        print(N // H)
    else:
        print(N//H + 1)
else:
    if N % W == 0:
        print(N // W)
    else:
        print(N//W + 1)

Submission status: Accepted

Solution code:
import math

h = int(input())
w = int(input())
n = int(input())

if h > w:
    print(math.ceil(n/h))
else:
    print(math.ceil(n/w))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

a=max(w,h)

ans=n//a+(n%a>0)
print(ans)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

def ceil_div(a, b):
    return (a + b - 1) // b

print(ceil_div(N, max(H, W)))

Submission status: Accepted

Solution code:
import math
a=int(input())
b=int(input())
x=int(input())
print(math.ceil(x/max(a,b)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import math
h = int(input())
w = int(input())
n = int(input())
print(math.ceil(n / h) if h > w else math.ceil(n / w))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
count1 = 0
count2 = 0

if h > w:
  while w > 0:
    count1 += h
    if count1 >= n:
      count2 += 1
      break
    else:
      count2 += 1
      w -= 1
else:
  while h > 0:
    count1 += w
    if count1 >= n:
      count2 += 1
      break
    else:
      count2 += 1
      h -= 1

print(count2)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
if n % max(h, w) == 0:
    print(int(n / max(h, w)))
else:
    print(int(n // max(h, w) + 1))

Submission status: Accepted

Solution code:
import math
h = int(input())
w = int(input())
n = int(input())
h = max(h,w)
print(math.ceil(n/h))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
if N % max(H, W) == 0 :
    print(int(N / max(H, W)))
else :
    print(int(N / max(H, W)) + 1)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

A_div, A_mod = divmod(N, H)
if A_mod != 0:
    A_div += 1

B_div, B_mod = divmod(N, W)
if B_mod != 0:
    B_div += 1

print(min(A_div, B_div))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
c=int(input())

d=max(a,b)
ans=0
for i in range(d+100):
  if d*i>=c:
    print(i)
    exit()

Submission status: Accepted

Solution code:
import math
H = int(input())
W = int(input())
N = int(input())
large = max(H,W)
print(math.ceil(N/large))

Submission status: Accepted

Solution code:
H, W, N = int(input()),int(input()),int(input())
HW=[H,W][H<W]
NdivHW=N/HW
NdivHW=int(NdivHW)+([0, 1][NdivHW%1>0])
print(NdivHW)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

import math

m = max(H,W)
print(math.ceil(N/m))

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

count1 = 0
count2 = 0
for i in range(1,W+1):
    count1 += 1
    if i*H >= N:
        break
for j in range(1,H+1):
    count2 += 1
    if j*W >= N:
        break
if count1 > count2:
    print(count2)
else:
    print(count1)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
a = max(h,w)
if n % a == 0:
  print(n // a)
else:
  print(n // a + 1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#input
import math
var = [int(input()) for _ in range(3)]
print(math.ceil(var[2]/max(var[0],var[1])))

Submission status: Accepted

Solution code:
def main():
    H = int(input())
    W = int(input())
    N = int(input())
    ans = -(-N//max(H, W))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b,c=[int(input()) for i in range(3)]
def main(a,b,c):
    x=max([a,b])
    if c%x==0:
      print(int(c/x))
    else:
      print(int(c/x+1))
main(a,b,c)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

k = max(h, w)
print((n + k - 1) // k)

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())

a=0
count=0
if H>W:
    
    for i in range(W):
        a+=H
        count+=1
        if a>=N:
            break
else:
    for i in range(H):
        a+=W
        count+=1
        if a>=N:
            break
print(count)

Submission status: Accepted

Solution code:
from math import ceil
H = int(input())
W = int(input())
N = int(input())

print(ceil(N/max(H,W)))

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
cnt=0
M=0
if H>W:
    selection=H
else:
    selection=W
while M<N:
    cnt+=1
    M+=selection

print(cnt)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

print((n-1)//max(h,w)+1)

Submission status: Accepted

Solution code:
h, w, n = map(int, [input() for _ in range(3)])
import math
print(math.ceil(n/max(h,w)))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
c=int(input())
if a<b:
  a,b=b,a
if c%a==0:
  print(c//a)
else:
  print(c//a+1)

Submission status: Accepted

Solution code:
def main():
    H = int(input())
    W = int(input())
    N = int(input())

    print((N-1)//max(H,W) + 1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

H = int(input())
W = int(input())
N = int(input())
print(math.ceil(N/max(H, W)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

n_push = []

for n_h in range(h+1):
  for n_w in range(w+1):
    n_tmp = (n_h)*w + (n_w)*h - ((n_h)*(n_w))

    if n_tmp>=n:
      n_push.append(n_h + n_w)

print(min(n_push))

Submission status: Accepted

Solution code:
import math
H = int(input())
W = int(input())
N = int(input())
print(math.ceil(N / max(H, W)))

Submission status: Accepted

Solution code:
import math

h = int(input())
w = int(input())
n = int(input())

l = max(h, w)
print(math.ceil(n / l))

Submission status: Accepted

Solution code:
from sys import stdin
H = int(stdin.readline().rstrip())
W = int(stdin.readline().rstrip())
N = int(stdin.readline().rstrip())
print((N-1)//max(H, W) + 1)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
m = max(w,h)
if n > n //m * m:
    ans = n // m + 1
else:
    ans = n // m
print(ans)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
import math
print(int(math.ceil(N / max(H, W))))

Submission status: Accepted

Solution code:
row = int(input())
colmun = int(input())
top = int(input())
low, high = 0,0
if row <= colmun:
  low, high = row, colmun
else:
  low, high = colmun, row
for n in range(low):
  if (n + 1) * high >= top:
    print(n + 1)
    break

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

all_cell = 0
count = 0
while all_cell < n:
    if h > w:
        all_cell += h
        w -= 1
    else:
        all_cell += w
        h -= 1

    count += 1
print(count)

Submission status: Accepted

Solution code:
H,W,N = [int(input()) for i in range(3)]
for o in range(1,10000):
  if H <= W and N / o <= W:
    break
  elif H >= W and N / o <= H:
    break
print(o)

Submission status: Accepted

Solution code:
import math

size = {}
size['H'] = int(input())
size['W'] = int(input())
N = int(input())
if size['H'] > size['W']:
    bigsize = 'H'
else:
    bigsize = 'W'
lines_num = math.ceil(N/size[bigsize])

print(lines_num)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
 
ans = 0
sum = 0
 
while(sum < n):
  if h >= w :
    sum += h
    ans += 1
    w -= 1
  else :
    sum += w
    ans += 1
    h -= 1
print(ans)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
sum = 0
answer = 0
while (sum < n):
    if h >= w:
        sum += h
        answer += 1
        w -= 1
    else:
        sum += w
        answer += 1
        h -= 1
print(answer)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

print(N//max(H,W) if N%max(H,W) == 0 else N//max(H,W)+1)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
if h<w:
	w,h=h,w
from math import ceil
print(ceil(n/h))

Submission status: Accepted

Solution code:
h,w,n=map(int,[input() for i in range(3)])
a=max(h,w)
print((n+a-1)//a)

Submission status: Accepted

Solution code:
import math
H = int(input())
W = int(input())
N = int(input())

print(math.ceil(N/max(H, W)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python

from collections import deque, defaultdict
import itertools as ite
import sys
import math
from decimal import *

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

H = input()
W = input()
N = input()
den = max(H, W)
print N / den + (N % den != 0)

Submission status: Accepted

Solution code:
import sys
H = int(sys.stdin.readline())
W = int(sys.stdin.readline())
N = int(sys.stdin.readline())
 
print((N - 1) // max(H, W) + 1)

Submission status: Accepted

Solution code:
#coding:utf-8
h = int(input())
w = int(input())
n = int(input())
#切り上げ
if h >= w:
    print(-(-n//h))
else:
    print(-(-n//w))

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
x=n//h
if n%h!=0:
    x+=1
y=n//w
if n%w!=0:
    y+=1
print(min(x,y))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

answer = h+w
for i in range(h+1):
  for j in range(w+1):
    area = i * w + j * h - i * j
    if area >= n:
      answer = min(answer, i+j)

print(answer)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())

X = 0

if H <= W:
  X = N // W
  if N % W != 0:
    X = X + 1
else :
  X = N // H
  if N % H != 0:
    X = X + 1
  
print(X)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

print((n-1) // max(h, w) + 1)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

for i in range(1, min(h,w) + 1):
    if i * max(h,w) >= n:
        print(i)
        exit()

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

if h >= w:
    larger = h
else:
    larger = w

if n % larger == 0:
    print(n // larger)
else:
    print(n // larger + 1)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

x = max(h, w)
cnt = 0
cur = 0

while cur < n:
	cur += x
	cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(H: int, W: int, N: int):
    if N % max(H, W) != 0:
        print(int(N / max(H, W) + 1))
    else:
        print(int(N / max(H, W)))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    N = int(next(tokens))  # type: int
    solve(H, W, N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())

x = max(h, w)
if n%x == 0:
  print(n//x)
else:
  print(n//x+1)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
count = 0
if h < w:
  a = w
  b = h
else:
  a = h
  b = w
 
x = int(n/a)
if n%a != 0:
  x += 1
print(x)

Submission status: Accepted

Solution code:
H, W, N = [int(input()) for _ in range(3)]
print(min((N+H-1)//H, (N+W-1)//W))

Submission status: Accepted

Solution code:
import math
H = int(input())
W = int(input())
N = int(input())
print(min(math.ceil(N / H), math.ceil(N / W)))

Submission status: Accepted

Solution code:
import math
h = int(input())
w = int(input())
n = int(input())

m = max(h,w)
print(math.ceil(n/m))

Submission status: Accepted

Solution code:
from math import ceil
H = int(input())
W = int(input())
N = int(input())
print(ceil(N / max(H,W)))