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:
h = int(input())
w = int(input())
n = int(input())
x = 0
y = 0

c = 1

if h > w:
    x = h
    y = h
else:
    x = w
    y = w

while x < n:
    c += 1
    x += y
print(c)

Submission status: Accepted

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

if H < W:
  count = N // W
  rate = N / W
  if count < rate:
     count += 1
  print(count)
else:
  count = N // H
  rate = N / H
  if count < rate:
     count += 1
  print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
H = int(input())
W = int(input())
N = int(input())

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

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())

ans = 0

if h > w:
    x = h
else:
    x = w
    
while n > 0:
    n = n - x
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
import math

a=input()
b=input()
c=input()
m=max(int(a),int(b))
print(math.ceil(int(c)/int(m)))

Submission status: Accepted

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline--------------------------------------------
   h = int(input())
   w = int(input())
   n = int(input())
   p = max(h,w)
   if n % p == 0:
       print(n//p)
   else:
       print(n//p+1)

if __name__ == "__main__":
    main() #endline===============================================

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, w, n = [int(input()) for _ in range(3)]

l = max(h, w)
p = 0
c = 0
while p < n:
    c += 1
    p += l
print(c)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
for i in range(min(h,w)):
  if (i+1)*max(h,w)>=n:
    print(i+1)
    break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
count= 1
aa = a
bb = b
if a<b :
  while c> bb:
    bb += b
    count +=1

else:
  while c> aa:
    aa += a
    count +=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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)
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

black = 0
result = 0
while black < N:
    if W < 0 or H < 0:
        print('error. W and H should be more tham 0')
        break

    if H > W:
        black += H
        W -= 1
    else:
        black += W
        H -= 1
    result += 1

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
ans = 0
painted_mas = 0


def min_raw():
    if H > W:
        return W
    elif W >= H:
        return H


def max_raw():
    if H > W:
        return H
    elif W >= H:
        return W


for i in range(min_raw()):
    ans += 1
    painted_mas += max_raw()
    if N <= painted_mas:
        print(ans)
        break

Submission status: Accepted

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

ans=0
count=0
i=0
while i<min(w,h):
	count+=max(w,h)
	ans+=1
	i+=1
	if count>=n:
		break

if count<n:
	j=0
	while j<max(w,h):
		ans+=1
		count+=min(w,h)
		j+=1
		if count>=n:
			break
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

if h >= w:
  a = h
else:
  a = w

x = True

while x:
  if b < n:
    b += a
    ans += 1
  else:
    x = False

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

num = 0
count = 0
w1 = w
w2 = w
h1 = h
h2 = h

while n > num:
    if w2 >= h2:
        num += w2
        w1 -= 1
        h2 -=1
    else:
        num += h2
        h1 -= 1
        w2 -=1
    
    count += 1

print(count)

Submission status: Accepted

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

while True:
  if max(H,W)*i>=N:
    print(i)
    break
  i=i+1

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if m > w:
    p = m
else:
    p = w

result = math.ceil(n / p)
print(result)

Submission status: Accepted

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

M = 0
L = 0
if H >= W:
    M = W
    L = H
else:
    M = H
    L = W

P = 0
ans = 0
for i in range(1, M+1):
    P += L
    ans += 1
    if P >= N:
        break

print(ans)

Submission status: Accepted

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

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:
a = int(input())
b = int(input())
c = int(input())

if a > b :
    d = a
else:
    d = b

anser = c/d
if c%d > 0 :
    anser = anser +1

print(int(anser))

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
H=int(input())
W=int(input())
N=int(input())
if H>=W:
    print(str(math.ceil(N/H)))
else:
    print(str(math.ceil(N/W)))

Submission status: Accepted

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

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:
# coding: utf-8

import math

row = int(input())
col = int(input())
objective = int(input())

bigger = row if row >= col else col
output = math.ceil(objective / bigger)

print(output)

Submission status: Accepted

Solution code:

#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

def main():
    h = ii()
    w = ii()
    n = ii()
    print(ceil(n/max(h,w)))




main()

Submission status: Accepted

Solution code:
h,w,n = [int(input()) for i in range(3)]
p = 0
for i in range(1,min(h,w)+1):
    p += max(h,w)
    if n<=p:
        print(i)
        exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
ans = max(H,W)
count = 0
score = 0
for i in range(10**(10)):
    
    count+=1
    score+=ans
    
    if score>=N:
        break
print(count)

Submission status: Accepted

Solution code:
import math

def int_input():
    return int(input())

H = int_input()
W = int_input()
N = int_input()

max_len = max(H, W)

print(math.ceil(N/max_len))

Submission status: Accepted

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

big = 0
temp = 0

if h >= w:
  temp = h
  big = h
else:
  temp = w
  big = w

c = 1

for i in range(1000000):
  if big >= n:
    break
  big += temp
  c += 1

print(c)

Submission status: Accepted

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

min_ = 9999999

for x in range(w+1):
  for y in range(h+1):
    if h*w - (h-y)*(w-x) >= n:
      min_ = min(x+y, min_)

print(min_)

Submission status: Accepted

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

M = max(h, w)
m = min(h, w)

from math import ceil
print(ceil(n / M))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

N = int(input())

ans1 = 0
ans2 = 0
# 横を塗る
tmp = 0
for i in range(H):
    tmp += W
    if tmp >= N:
        ans1 = i+1
        break        

tmp = 0
for i in range(W):
    tmp += H
    if tmp >= N:
        ans2 = i+1
        break        
        
print(min(ans1,ans2))

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 h > w:
  h,w = w,h
print(n//w if n%w == 0 else n//w+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:
s = [int(input()) for i in range(3)]
H = s[0]
W = s[1]
N = s[2]
a = max(H,W)
b = (N + a -1)//a
print(b)

Submission status: Accepted

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

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

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())
cnt1 = N // H
cnt2 = N // W
min_cnt = min(cnt1, cnt2)
if min_cnt * H < N and min_cnt * W < N:
  min_cnt = min_cnt + 1
print(min_cnt)

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:
H=int(input())
W=int(input())
N=int(input())
sumation=0
count=1
while True:
    index=max(H,W)
    if(index==H):
        sumation+=index
        W-=1
    elif(index==W):
        sumation+=index
        H-=1
    

    if(sumation>=N):
        break
    else:
        count+=1

print(count)

Submission status: Accepted

Solution code:

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

if H >= W:
    MAX=H
    Times=W
else:
    MAX=W
    Times=H

for i in range(1,Times+1):
    if MAX*i >= N:
        ans=i
        break

print(ans)

Submission status: Accepted

Solution code:
import math

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

if H < W:
    tmp = W
else:
    tmp = H

i = 1
while tmp * i < N:
    i += 1
print(i)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    h = int(input())
    w = int(input())
    n = int(input())
    max_value = max(h, w)

    for i in range(10000 + 1):
        if max_value * i >= n:
            print(i)
            exit()


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h, w, n = list(int(input()) for a in range(3))
if h>=w:
    key=h

elif h<w:
    key=w

cnt = 0
while n>0:
    n=n-key
    cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
import sys


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

    n_black = 0

    larger = max([H, W])
    smaller = min([H, W])

    n_l = 0
    n_s = 0

    for i in range(H+W):
        paint_l = larger - n_s
        paint_s = smaller - n_l

        if paint_l >= paint_s:
            n_black += paint_l
            n_l += 1
        else:
            n_black += paint_s
            n_s += 1

        if n_black >= N:
            break

    print(n_l + n_s)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
S=int(input())
T=int(input())

if N>S:
    if T%N==0:
        ans=T//N
    else:
        ans=int(T/N)+1
else:
    if T%S==0:
        ans=T//S
    else:
        ans=int(T/S)+1

print(ans)

Submission status: Accepted

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

HW = max(H, W)
a = N // HW
if a * HW < N:
    a += 1
print(a)

Submission status: Accepted

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

large=max(H,W)

if (N/large).is_integer():
    print(int(N/large))
else:
    print(int(N/large)+1)

Submission status: Accepted

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

s = 0
c = 0

while s < N:
    if H < W:
        s += W
        H -=1
    else:
        s += H
        W -=1
    c += 1

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

while p<N:
  cnt+=1
  if H>=W:
    p+=H
    W-=1
  else:
    p+=W
    H-=1

print(cnt)

Submission status: Accepted

Solution code:
W = int(input())
H = int(input())
N = int(input())
longer = max(W, H)
res = cur = 0
while cur < N:
    cur += longer
    res += 1
print(res)

Submission status: Accepted

Solution code:
# Keyence 2020 A
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
h=ni()
w=ni()
n=ni()
ans=0
for i in range(10000):
    if n>0:
        t=max(h,w)
        n-=t
        ans+=1
    elif n<=0:
        break
print(ans)

Submission status: Accepted

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

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

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, w, n = [list(map(int, s.split()))[0] for s in open(0)]
print(min(int((n-1)//h+1), int((n-1)//w+1)))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

    res = 0
    black = 0

    if H >= W:
        D = W
        E = H
    else:
        D = H
        E = W

    for i in range(D):
        if black >= N:
            break
        black += E
        res += 1

    print(res)



main()

Submission status: Accepted

Solution code:
from sys import stdin
import math

h = int(stdin.readline().rstrip())
w = int(stdin.readline().rstrip())
n = int(stdin.readline().rstrip())

i = n / max(h,w)

print(math.ceil(i))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
cur = 0
cnt = 0
bigger = max(h, w)

while True:
    if cur >= n:
        break

    cur += bigger
    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

num = 0
many = 0

while(1):
    if n <= many:
        break

    if h > w:
        many += h
        num+=1
    else:
        many += w
        num+=1

print (num)

Submission status: Accepted

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


def f(x):
    if x % 1 == 0:
        return int(x)
    else:
        return int(x) + 1


y = f(n / max(h, w))
print(y)

Submission status: Accepted

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

ans = 0
border = n

for i in range(1000):

    if h >= w:
        n -= h
        ans += 1
    else:
        n -= w
        ans += 1

    if n <= 0:
        print(ans)
        sys.exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

count = 0

if H <= W:
    count = np.ceil(N/W)
else:
    count = np.ceil(N/H)

print(int(count))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
m = max(h,w)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def main():
    h = int(input())
    w = int(input())
    n = int(input())
    if h < w:
        res = n // w
        if n % w > 0:
            res += 1
    else:
        res = n // h
        if n % h > 0:
            res += 1
    print(res)


if __name__ == '__main__':
    input = sys.stdin.readline
    main()

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 = int(input())
W = int(input())
N = int(input())
El = max(H, W)
ans =  N // El
if N % El > 0:
    ans += 1
print(ans)

Submission status: Accepted

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

import math
i = max([h, w])
ans = math.ceil(n / math.ceil(i))
print(ans)

Submission status: Accepted

Solution code:
import math


def main():
    h = int(input())
    w = int(input())
    n = int(input())
    ans = math.ceil(n / max(w, h))

    print(ans)


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())

sum = 0
if h > w:
  for i in range(n):
    sum += h
    if sum >= n:
      print(i+1)
      break
else:
  for i in range(n):
    sum += w
    if sum >= n:
      print(i+1)
      break

Submission status: Accepted

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

#print H, W, N

x = max(H, W)
print int(math.ceil(1.0*N/x))

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())
if W<H:
    small=W
    large=H
else:
    small=H
    large=W
mod=N%large
if mod==0:
    print(int(N/large))
else:
    print(int(N/large)+1)

Submission status: Accepted

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

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

Submission status: Accepted

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

x = max([h, w])

num = n % x
if num:
  print(n // x + 1)
else:
  print(n // x)

Submission status: Accepted

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

a = max(H, W)
kuro = 0

times = 0

while kuro < N:
    kuro += a
    times +=1
    
print(times)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
if h>=w:
    for i in range(1,w+1):
        ans=h*i
        if ans>=n:
            print(i)
            exit()
else:
    for i in range(1,h+1):
        ans=w*i
        if ans>=n:
            print(i)
            exit()

Submission status: Accepted

Solution code:
from math import ceil

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

m = max(H, W)

print(ceil(N / m))

Submission status: Accepted

Solution code:
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())
ans = 0
idx = 0
if H > W:
    pass
elif W > H:
    H,W = W,H

for i in range(1,W+1):
    ans += H
    idx += 1
    if ans >= N:
        print(idx)
        break

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:
# -*- coding: utf-8 -*-
h = int(input())
w = int(input())
n = int(input())

ans = []
black = 0
if h >= w:
    for i in range(h * w):
        black = h * i
        if black >= n:
            ans.append(i)
    print(min(ans))
else:
    for i in range(h * w):
        black = w * i
        if black >= n:
            ans.append(i)
    print(min(ans))

Submission status: Accepted

Solution code:
'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''
'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''
'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''
'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''
'''
.append(要素)
.extend(要素)
.insert(場所,要素)
del 配列名[場所]
-1で末尾で末尾から一つ前
'''
'''
間に空白追加
' '.join(lis)
'''
'''
copy.copy(配列名)
'''
'''
sort()
sorted(reverse=true)
'''
'''
2分探索
bisect.bisect_left(リスト, 要素)
'''
'''
リスト同士の演算
list(map(lambda x, y: x+y, el2, el3))
'''
'''
配列の初期化
配列名=[a]*n+[b]*m
'''
'''
重複
list(set())
２次元配列
list(map(list, set(map(tuple, addition))))
'''
'''
順列
for el in itertools.permutations(配列のパターン):
'''
'''
Decimal()
'''
# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()




from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
import itertools
from functools import reduce
from operator import mul
def gcd(*numbers):
    return reduce(math.gcd, numbers)


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


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


def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


H = int(stdin.readline().rstrip())
W = int(stdin.readline().rstrip())
N = int(stdin.readline().rstrip())
use = 0
if H >= W:
    use = H
else:
    use = W
res = N / use
if N % use != 0:
    res += 1
print(int(res))

Submission status: Accepted

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

print(int(n/max(h,w) +0.99999))

Submission status: Accepted

Solution code:
import sys

h, w, n = map(int, sys.stdin.read().split())
if h < w:
        h, w = w, h

def main():
    return (n + h - 1) // h

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
# print(H, W, N)

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

n = 0
cnt = 0
while n < N:
    n += H
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import math
b = []
for i in range(3):
    a = int(input())
    b.append(a)
c = min(b[0],b[1])
d = max(b[0],b[1])
e = b[2]/d 
print(math.ceil(e))

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, open(0).read().split())
print( (n+(max(h,w)-1))//max(h,w) )

Submission status: Accepted

Solution code:
H, W, N = [int(input()) for _ in range(3)]
import math
print(math.ceil(N / max(H, W)))

Submission status: Accepted

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

a = 0
b = 0
while a<n:
  a += max(h, w)
  b += 1

print(b)

Submission status: Accepted

Solution code:
import sys
import math

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

    if H >= W:
        nuri = H
    else:
        nuri = W

    print(math.ceil(N / nuri))

main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    h=II()
    w=II()
    n=II()
    if h<w:h,w=w,h
    ans=(n+h-1)//h
    print(ans)
main()

Submission status: Accepted

Solution code:
import collections as c
ip = lambda : map(int, input().split())
mod = 10**9+7
# ##############
H =int(input())
W = int(input())
N = int(input())
s = max(H,W)
print((N+s-1)//s)

Submission status: Accepted

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

if h > w:
    div = h
else:
    div = w

if n % div > 0:
    ans = int(n / div) + 1
else:
    ans = int(n / div)

print(ans)

Submission status: Accepted

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

large = max(H,W)
ans = int((N-1) / large)+1

print(ans)

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())
ans = 0
x = 0
while x < n:
    x += max(h, w)
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
a=0
i=0
if H>=W:
  a=H
else:
  a=W

while a*i<N:
  i+=1
print(i)

Submission status: Accepted

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

Submission status: Accepted

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

nn = max(h,w)

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