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

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

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

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

Solution (Python):
H,W,N=[int(input()) for i in range(3)]
print(-(-N//max(H,W)))

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

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

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

t = max(h, w)
ans = n // t + bool(n%t)
print(ans)

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

m=max(h,w)
print(n//m+(n%m!=0))

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

ans = 0
M = max(H, W)
while ans*M < N:
    ans += 1

print(ans)

Solution (Python):

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)

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

if H > W:
    ans = (N + (H - 1)) // H
else:
    ans = (N + (W - 1)) // W

print(ans)

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

h = I()
w = I()
n = I()

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

Solution (Python):
from math import ceil

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

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

Solution (Python):
import math
H=int(input())
W=int(input())
N=int(input())
if H<W:
    print(math.ceil(N/W))
else:
    print(math.ceil(N/H))

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

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

Solution (Python):
import sys
input = sys.stdin.readline
h=int(input())
w=int(input())
n=int(input())
print(-(-n//max(h,w)))

Solution (Python):
import sys
input = sys.stdin.readline
H = int(input())
W = int(input())
N = int(input())
maxHW = max(H, W)
a = N // maxHW
if N % maxHW != 0:
    a += 1
print(a)

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

if h > w:
    print(-(-n//h))
else:
    print(-(-n//w))

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

Solution (Python):

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

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

Solution (Python):
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)

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


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

Solution (Python):
import math
n = int(input())
m = int(input())
x = int(input())
a = max(n,m)
print(math.ceil(x/a))

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

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

Solution (Python):
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

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

Solution (Python):
H, W, N = int(input()), int(input()), int(input())

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

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]





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

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

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(H, W, N):
    return math.ceil(N/ max(H, W))


def main():
    H = read_int()
    W = read_int()
    N = read_int()
    print(slv(H, W, N))


if __name__ == '__main__':
    main()

Solution (Python):

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

ans = 0
count = 0
s = max(h,w)
while ans < n:
    ans += s

    count+= 1

print(count)

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

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

Solution (Python):
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)

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

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
h = max(h, w)
res = n // h
r = n % h
if r:
    res += 1
print(res)

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

for i in range(10000000):
    if max(h,w)*i >= n:
        print(i)
        break

Solution (Python):
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)

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

Solution (Python):
from math import ceil

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

mx = max(h, w)

ans = ceil(n / mx)
print(ans)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
mod=10**9+7
h=int(input())
w=int(input())
n=int(input())
ma=max(h,w)
print((n+ma-1)//ma)

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

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

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

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

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

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

Solution (Python):


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

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

Solution (Python):
def main():
    import sys
    import math
    H=int(sys.stdin.readline())
    W=int(sys.stdin.readline())
    N=int(sys.stdin.readline())
    print(math.ceil(N/max(W,H)))

main()

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

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

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

Solution (Python):
H, W, N = [int(input()) for _ in range(3)]

b = max(H, W)
ans = -(-N // b)
print(ans)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H,W,N = map(int,read().split())

x = max(H,W)

answer = (N+x-1)//x
print(answer)

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

Solution (Python):
a = int(input())
b = int(input())

c = int(input())
m = max(a, b)
if(c%m == 0):print(int(c/m))
else:print(int(c/m)+1)

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

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
ans = 0
p = 0
while p < N:
    p += max(H,W)
    ans += 1

print(ans)

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline

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

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


if __name__ == '__main__':
    main()

Solution (Python):

def updiv(a,b):
    if a % b == 0:
        return a // b
    else:
        return a // b + 1

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

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

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

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

Solution (Python):
import sys
from math import ceil
h = int(input())
w = int(input())
n = int(input())
print(ceil(n / max(h, w)))

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

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Solution (Python):
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)

Solution (Python):
from math import ceil

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

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

Solution (Python):
import sys
input = sys.stdin.readline
H = int(input())
W = int(input())
N = int(input())
print(-(-N // max(H, W)))

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

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

Solution (Python):
H, W, N = int(input()), int(input()), int(input())
M = max(H, W)
print(N // M + (N % M != 0))

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

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

Solution (Python):
def main():
    h = int(input())
    w = int(input())
    n = int(input())
    m = max(h, w)
    print((n-1)//m+1)


main()

Solution (Python):
H = int(input())
W = int(input())
N = int(input())
a = max(H, W)
ans = (N + a - 1) // a
print(ans)

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

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

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

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

Solution (Python):
H=int(input())
W=int(input())
N=int(input())
a=max(H, W)
b=N//a
c=N%a
if c>0:
  d=1
else:
  d=0
print(b+d)

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

def ceil(a, b):
   return a // b + (a % b > 0)

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

Solution (Python):
H = int(input())
W = int(input())
n = int(input())
print((n-1)//max(H, W)+1)

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

Solution (Python):

import sys
INF = float("inf")


def solve(H: int, W: int, N: int):
    if H > W:
        W, H = H, W
    print(-(-N//W))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  
    W = int(next(tokens))  
    N = int(next(tokens))  
    solve(H, W, N)


if __name__ == '__main__':
    main()

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

tmp = max(H, W)

print ((N + tmp - 1) // tmp)

Solution (Python):
h = int(input())
w = int(input())
n = int(input())
if h < w:
    h,w = w,h

ans = -(-n//h)
print(ans)

Solution (Python):
H,W,N = int(input()), int(input()), int(input())

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

Solution (Python):
a=int(input())
s=int(input())
d=int(input())
print(-(-d//max(a,s)))

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

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

Solution (Python):


import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
read = sys.stdin.read



h,w,n = [int(i) for i in read().split()]

a = max(h,w)

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

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

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

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

Solution (Python):
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)

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

A = max(H, W)

ans = -(-N // A)
print(ans)

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

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

Solution (Python):

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

Solution (Python):
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)

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

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

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

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

use = max(h, w)

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

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

H = inp()
W = inp()
N = inp()

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

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

h = onem()
w = onem()

ma = max(h,w)

p = onem()

print(-(-p//ma))

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    h,w,n = IR(3)
    k = max(h,w)
    print(math.ceil(n/k))
    return


if __name__ == "__main__":
    solve()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

H = INT()
W = INT()
N = INT()

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

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

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    H=I()
    W=I()
    N=I()
    print(ceil(N/max(H,W)))
if __name__ == '__main__':
    main()

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

mx = max(h, w)
res = 0
cnt = 0
while cnt < n:
    res += 1
    cnt += mx
print(res)

Solution (Python):
h=int(input())
w=int(input())
n=int(input())
print(min(0--n//w,0--n//h))

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
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()

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


h, w, n = [int(sys.stdin.buffer.readline()) for _ in range(3)]
ans = math.ceil(n / max(h, w))
print(ans)