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())
if h >= w:
    _max = h
    _min = w
else:
    _max = w
    _min = h
for i in range(1, _min+1):
    if _max * i >= n:
        print(i)
        break

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# n, k = map(int, input().split())
# from collections import OrderedDict
# d = OrderedDict()
# a = list(input().split())
# b = list(map(int, input().split()))
# print(r + max(0, 100*(10-n)))
# print("Yes" if 500*n >= k else "No") 
# s = input()
a = int(input())
b = int(input())
c = int(input())
print((c+max(a, b)-1)//max(a, b))

Submission status: Accepted

Solution code:
import math
h,w,n=map(int,open(0).read().split());print(math.ceil(n/max(w,h)))

Submission status: Accepted

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

Submission status: Accepted

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

q,r = divmod(n, max(h,w))
print(q + int(bool(r)))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
ans=0
while n>=1:
  if h>w:
    n-=h
    w-=1
    ans+=1
  else:
    n-=w
    h-=1
    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:
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())

cnt=0
ans=0
while cnt<n:

    if h>=w:
        cnt+=h

    elif h<w:
        cnt+=w
    ans+=1

print(ans)

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())
cnt = 0
ans = 0
while ans < n:
    if h < w:
        ans += w
        h -= 1
    else:
        ans += h
        w -= 1
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# from collections import defaultdict, deque
# import math
# import copy
from bisect import bisect_left, bisect_right
# import heapq

# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 10 ** 9 + 7
def solve():
    h = int(input())
    w = int(input())

    k = int(input())

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


def main():
    n = getN()
    for _ in range(n):
        solve()
if __name__ == "__main__":
    # main()
    solve()

Submission status: Accepted

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

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 sys
readline = sys.stdin.readline

def main():
    H = int(readline())
    W = int(readline())
    N = int(readline())
    print(-(-N // max(H, W)))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(2)]
b = int(input())

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

Submission status: Accepted

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

cnt = 0
res = 0
while True:
    if cnt >= N:
        break
    cnt += max(H, W)
    res += 1

print(res)

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    h = gete(int)
    w = gete(int)
    n = gete(int)

    if h < w:
        h, w = w, h

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(2)]
b = int(input())
if b % max(a) == 0:
  print(b // max(a))
else:
  print(b // max(a) + 1)

Submission status: Accepted

Solution code:
import math
def main():
    H = int(input())
    W = int(input())
    N = int(input())
    print(int(math.ceil(N/max(H, W))))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

    c_row = 0
    c_col = 0
    ans = 0

    while True:
        if N <= 0:
            print(ans)
            break
        else:
            if W - c_col <= H - c_row:
                N -=  H - c_row
                c_col += 1
                ans += 1
            else:
                N -=  W - c_col
                c_row += 1
                ans += 1

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# A - Painting
import sys

debug = lambda message: print("DEBUG:", message, file=sys.stderr)


def main():
    H, W, N = map(int, open(0))
    debug(max(H, W))
    print((N + max(H, W) - 1) // max(H, W))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())
H,W,N = [I() for _ in range(3)]
print(-(-N//max(H,W)))

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())
H,W,N = [I() for _ in range(3)]
ans,mod = divmod(N,max(H,W))
print(ans if mod==0 else ans+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)
    else:
        print(n // w + 1)
else:
    if n % h == 0: 
        print(n // h)
    else:
        print(n // h + 1)

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
H,W,N = ILs(3)

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

Submission status: Accepted

Solution code:
d = max(int(input()), int(input()))
print((int(input())+(d-1))//d)

Submission status: Accepted

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

import math

def main():
    h = int(input())
    w = int(input())
    n = int(input())
    if w >= h:
        ans = math.ceil(n/w)
    else:
        ans = math.ceil(n/h)
    print(ans)

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)

def main():
    H = int(input().strip())
    W = int(input().strip())
    N = int(input().strip())
    ans = N // max(H, W)
    if N % max(H, W) > 0:
        ans += 1
    return ans

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

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

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

Submission status: Accepted

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

l = max(h,w)

print(-(-n//l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
y = int(input())
z = int(input())

a = max(x,y)
if z%a == 0:
  print(z//a)
else:
  print(z//a+1)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
c=max(a,b)
n=int(input())

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

Submission status: Accepted

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

hw=max(h,w)

ans=(n+hw-1)//hw

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
h = I()
w = I()
n = I()
if h < w:
    for i in range(1,h+1):
        if i * w >= n:
            print(i)
            exit()
else:
    for i in range(1,w+1):
        if i*h >= n:
            print(i)
            exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
counter=0
k=0
while counter<n:
  k+=1
  counter+=max(h,w)
print(k)

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:
import sys
sys.setrecursionlimit(10**6) #再帰関数の上限
import math
from copy import copy, deepcopy
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque 
#deque(l), pop(), append(x), popleft(), appendleft(x)
##listでqueの代用をするとO(N)の計算量がかかってしまうので注意
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする


def input(): return sys.stdin.readline()[:-1]
def printl(li): print(*li, sep="\n")
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N=len(v)
    size=len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def main():
    mod = 10**9+7
    #w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

    #N = int(input())
    #N, K = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列


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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys, math

h, w, n = [int(i) for i in sys.stdin.readlines()]

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

Submission status: Accepted

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

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:
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())
cnt=0
black=0
while black<n:
    if h>=w:
        black+=h
        w-=1
    else:
        black+=w
        h-=1
    cnt+=1
#print(black)
print(cnt)

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:
H = int(input())
W = int(input())
N = int(input())
r = (N +max(H, W)-1)//max(H, W)
print(r)

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(ceil(n/max(h,w)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
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 li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

H = ii()
W = ii()
N = ii()

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

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())
def paint(H,W,N):
    large = max(H,W)
    if N/large == int(N/large):
        return int(N/large)
    else:
        return int (N/large)+1
print(paint(H,W,N))

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


def main():
    H = int(input())
    W = int(input())
    N = int(input())
    print(math.ceil(N / max([H, W])))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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=[int(input()) for i in range(3)]
print((N+max(H,W)-1)//max(H,W))

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
c=0
ans=0
if H>=W:
    while c>=0:
        c+=H
        ans+=1
        if c>=N:
            break
else:
    while c>=0:
        c+=W
        ans+=1
        if c>=N:
            break
print(ans)

Submission status: Accepted

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

N += max(H-1,W-1)

ans = N//max(H,W)

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

# A - Painting
h, w, n = [int(input()) for i in range(3)]

if h > w:
	row = h
else:
	row = w

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

Submission status: Accepted

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

Submission status: Accepted

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

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 N // H > N // W:
	print((N // W) + 1 ) if N % W != 0 else print(N // W)
else:
	print((N // H) + 1 ) if N % H != 0 else print(N // 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 = 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())
m = max(h, w)
print(n // m + 1) if n % m else print(n // m)

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 sys
import math
import bisect

def solve(s):
    n = len(s)
    if n % 2 == 1:
        return False
    for i in range(0, n, 2):
        if s[i:i+2] != 'hi':
            return False
    return True

def main():
    H = int(input())
    W = int(input())
    n = int(input())
    A = []
    for h in range(H + 1):
        for w in range(W + 1):
            val = H * w + h * W - h * w
            if val >= n:
                A.append(h + w)
    print(min(A))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    q, r, = divmod(N, max(H, W))
    ans = q
    ans += 1 if r > 0 else 0

    print(ans)


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, w, n = (int(input()) for i in range(3))
l = max(h, w)
print(-(n//(-l)))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
a = 0
b = 0
c = 0
d = 0
for i in range(h):
  a += w
  b += 1
  if a >= n:
    break
for i in range(w):
  c += h
  d += 1
  if c >= n:
    break
if b > d:
  print(d)
else:
  print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def keyence20_a():
    H, W, N = map(int, readlines())
    lg = max(H, W)
    ans = (N + lg - 1) // lg
    print(ans)

keyence20_a()

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())
print(-(-n // max(h, w)))

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

cnt, paint = 0, 0
while paint < N:
    paint += max(H,W)
    cnt += 1
print(cnt)

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

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())
for i in range(min(H,W)):
    N -= max(H, W)
    if N <= 0:
        print(i+1)
        exit()

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
h = max(h, w)
print((n -1) // h + 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:
H = int(input())
W = int(input())
N = int(input())
if N % max(H, W) !=0:
    print(N // max(H, W) + 1)
else:
    print(N // max(H, W))

Submission status: Accepted

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

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

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

lines = 0
act = 0

if h <= w:
#     print('w long')
    lines = h
    act = w
else:
#     print('h long')
    lines = w
    act = h
    
# print(lines)
# print(act)
    
draw = 0 
for i in range(lines):
    
    if n <= (i + 1) * act:
        print(i + 1)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import string
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

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

    v=max(h,w)
    cnt=0
    while n>0:
        n-=v
        cnt+=1
    print(cnt)

resolve()

Submission status: Accepted

Solution code:
hei = int(input())
wei = int(input())
n = int(input())
kuro =0
count = 0

if hei > wei:
  data = hei
else:
  data = wei 
while kuro<n:
  kuro +=data 
  count +=1
print(count)

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

if h >= w:
  print(-(-n//h))
elif w > h:
  print(-(-n//w))

Submission status: Accepted

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

ans = 0
num = 0
big = 0
if H < W:
  big = W
else:
  big = H
while num < N:
  num += big
  ans += 1
  
print(ans)

Submission status: Accepted

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

q, mod = divmod(N, max(H, W))

print(q if mod == 0 else q + 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:
# Problem A - Painting

import math

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

# initialization
max_num = max(H, W)
ans = math.ceil(N / max_num)

# output
print(ans)

Submission status: Accepted

Solution code:
i=lambda:int(input());c=max(i(),i());print(0--i()//c)

Submission status: Accepted

Solution code:
i = lambda:int(input())
c = max(i(),i())
print(0--i()//c)

Submission status: Accepted

Solution code:
a, b, c = [int(input()) for _ in range(3)]
x = max(a, b)
print((c+x-1)//x)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    h = int(input())
    w = int(input())
    n = int(input())
    if h>=w:
        print((n-1)//h+1)
    else:
        print((n-1)//w+1)

if __name__ == '__main__':
    main()