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

i = 0
j = 0
if H > W:
    while i < N:
        j = j + 1
        i = H + i
elif H < W:
    while i < N:
        j = j + 1
        i = W + i
else:
    while i < N:
        j = j + 1
        i = H + i
print(j)

Submission status: Accepted

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

L = max(H,W)

print(int((N / L)) if N % L == 0 else N // L + 1 )

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/keyence2020/tasks/keyence2020_a


def main():
    h = int(input())
    w = int(input())
    t = int(input())
    longer = max(h, w)
    shorter = min(h, w)
    num = t // longer
    if num * longer < t:
        num += 1
    print(num)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
mass = 0
if h <= w:
  for i in range(0, h+1):
    mass = i*w
    if mass >= n:
      print(i)
      break
else:
  for i in range(0, w+1):
    mass = i*h
    if mass >= n:
      print(i)
      break

Submission status: Accepted

Solution code:
def resolve():
    H = int(input())
    W = int(input())
    N = int(input())
    m = max(H, W)
    print(N // m if N / m == N//m else N // m + 1)
resolve()

Submission status: Accepted

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

lim = H*W+1
total = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,w,n=[input() for i in range(3)]
n = int(n)
w = int(w)
h = int(h)
if(h >= w):
  temp = h
elif(w > h):
  temp = w
if(n % temp != 0):
  temp = (n // temp)
  temp = temp + 1
else:
  temp = (n // temp)
print(temp)

Submission status: Accepted

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

v  = 200 / 100

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

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

Num = 0
Count = 0
if(H > W):
  while(Num < N):
    Num += H
    Count += 1
else:
  while(Num < N):
    Num += W
    Count += 1

print(Count)

Submission status: Accepted

Solution code:
h=int(input())

w=int(input())

n=int(input())

i=0
j=0

if(h>=w):
  s=h
else:
  s=w

while j<n:
  i+=1
  j=j+s

print(i)

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 W < H:
    W, H = H, W

black = 0
ans = 0
for i in range(H):
    if black < N:
        ans += 1
        black += W
    else:
        break


print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

#行をa回、列をb回選んで操作した場合
#塗られるマスの数は(H *a + W *b - a * b)

A = list(range(H+1))
B = list(range(W+1))
AB = [[a, b] for a in A for b in B]

ANS = []
for ab in AB:
  a = ab[0]
  b = ab[1]
  SUM = H * a + W * b - a * b
  if N <= SUM:
    sum_N = a + b
    ANS.append(sum_N)

ANS.sort()
ans = ANS[0]
print(ans)

Submission status: Accepted

Solution code:
h, w, n = [int(input()) for _ in range(3)]
m = max(h, w)
ans = n // m
ans += 1 if n % m else 0
print(ans)

Submission status: Accepted

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

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

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:
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())
paint = ans = 0

while paint < N:
  paint += max(H, W)
  ans += 1
  if paint >= N:
    break
  if N - paint <= min(H, N):
    ans += 1
    break

print(ans)

Submission status: Accepted

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

import math

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

max = W
if H >= W:
    max = H
print(int(math.ceil(N/max)))

Submission status: Accepted

Solution code:
import math
nh = int(input())
nw = int(input())
nn = int(input())
bigger_n = max(nh, nw)
print(int(math.ceil(nn / bigger_n)))

Submission status: Accepted

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

a = -(-N // max(H, W))

print(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

if __name__ == '__main__':
    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(h,w)
b=0
m=0

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

C = 0
if H > W:
  C = H
else:
  C = W

if N % C != 0:
  print(int((N / C) + 1))
else:
  print(int(N / C))

Submission status: Accepted

Solution code:
from bisect import bisect_right, bisect_left
from itertools import groupby, permutations, combinations
from fractions import gcd
import numpy as np
from sys import stdin, stderr

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

    l = max(H,W)
    ret = N // l
    if not N % l == 0:
        ret += 1
    return ret


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(H: int, W: int, N: int):
    m = max(H, W)
    from math import ceil
    print(ceil(N/m))
    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))  # 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())

t = 0
if h >= w:
  t = h
else:
  t = w

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

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
counth = 0
countw = 0
while True:
    if (H-countw) < (W-counth) and countw < W:
        N -= (W-counth)
        countw += 1
    else:
        N -= (H-countw)
        counth += 1
    if N <= 0:
        break
 
 
print(counth+countw)

Submission status: Accepted

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

H = H
W = W
count = 0
paint = 0
while paint<N:
  if W>H:
    count +=1
    paint += W
    H-=1
  else:
    count +=1
    paint += H
    W -=1
else:
  print(count)

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
count = 0
if(h >= w):
    for i in range(0,w+1,1):
        if((h*w) - (h*(w-i)) >= n):
            count = i
            break
else:
    for i in range(0,h+1,1):
        if((h*w) - (w*(h-i)) >= n):
            count = i
            break
print(i)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

Submission status: Accepted

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

target = 0
ans = 0

if (h > w):
  target = h
else:
  target = w

ans = n // target
if ( n % target ) > 0:
  ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import calendar
import fractions
import itertools

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

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

Submission status: Accepted

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

N = int(input())

boad = [[0] * W for i in range(H)]
n = 0
# boad.pop()
count = 1
j = 1
# print(boad)
if N <= H or N <= W:
    print(1)

elif H < W:

    boad.pop()
    n = W
    while(True):
        
        if n + len(boad[0]) >= N:
            count += 1
            print(count)
            break

        elif n + len(boad) >= N:
            count += 1
            print(count)
            break

        n += W
        count += 1
        boad.pop()

elif W < H:
    W -= 1
    boad = boad = [[0] * W for i in range(H)]
    n = H

    while(True):
        
        if n + len(boad[0]) >= N:
            count += 1
            print(count)
            break

        elif n + len(boad) >= N:
            count += 1
            print(count)
            break

        n += H
        W -= 1
        count += 1
        boad = [[0] * W for i in range(H)]

else:
    boad.pop()
    n = W
    while(True):
        
        if n + len(boad[0]) >= N:
            count += 1
            print(count)
            break

        elif n + len(boad) >= N:
            count += 1
            print(count)
            break

        n += W
        count += 1
        boad.pop()

Submission status: Accepted

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

# k*h
# k*w

mini=100009999

for k in range(1, h+1):
    if k*h >=n:
        print(k)
        exit()
    elif k*w >= n:
        print(k)
        exit()

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
flg,cnt,pn=0,0,0
mh,mw=h,w
hcnt,wcnt=h,w
while pn<n:
  if mh==mw:
    if hcnt>wcnt:
      flg=0
    else:
      flg=1
  elif mh>mw:
    flg=1
  else:
    flg=0
  if flg==1:
    pn+=mh
    wcnt-=1
    mw-=1
    cnt+=1
  else:
    pn+=mw
    hcnt-=1
    mh-=1
    cnt+=1    
print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import fractions

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)

    # divisors.sort()
    return divisors

def bitlist(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res

#a = list(map(int, input().split()))

w = int(input())
h = int(input())
t = int(input())

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

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
ha = h
wa = w
count = 1
if(h >= w):
    while(n > ha):
        ha += h
        count += 1
    print(count)
else:
    while(n > wa):
        wa += w
        count += 1
    print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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 = float(input())
W = float(input())
N = float(input())

if H > W:
  d = H
else:
  d = W

c = N / d

if c - c//1 == 0:
  print(int(c))
else:
  print(int(c//1)+1)




#print('H=', H, 'W=', W, 'N=', N)

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

Submission status: Accepted

Solution code:
#1
h=int(input())
w=int(input())
n=int(input())
ans=0
x=max(h,w)
while n>0:
    ans+=1
    n=n-x
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
O = 0
P = 0

while P < N:
    # if H <= W:
    #     P = P + W
    #     W -= 1
    #     O += 1
    # else:
    #     P = P + H
    #     H -= 1
    #     O += 1
    if H >= W:
        P += H
        O += 1
    else:
        P += W
        O += 1

print(O)

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

count = 0

if H <= W:
    val = N / W
    sss = math.ceil(val)
    print(sss)

else:
    val = N / H
    sss = math.ceil(val)
    print(sss)

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:
# coding: utf-8
import re
import math
#import numpy as np

mod=int(10**9+7)

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

import math

u = N/max(H,W)

print(math.ceil(u))

Submission status: Accepted

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

n_W = 0
n_H = 0

if H > W:
  for i in range(W):
    if H*(i+1) >= N:
      n_H=i+1
      break
  if i+1 == W and n_H == 0:
    n_H = i+1
    for j in range(H):
      if W*(j+1) + H*(n_H) >= N:
        n_W = j+1
        break
else:
  for i in range(H):
    if W*(i+1) >= N:
      n_W=i+1
      break
  if i+1 == H and n_W == 0:
    n_W = i+1
    for j in range(W):
      if H*(j+1) + W*(n_W) >= N:
        n_H = j+1
        break
  
        
print(n_W + n_H)

Submission status: Accepted

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

N=int(input())
num = 0
if H >= W:
    for i in range(W):
        if (i+1)*H >= N:
            num = i+1
            break
else:
    for j in range(H):
        if (j+1)*W >= N:
            num = j+1
            break
print(num)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if h > w:
  ans = int(n/h)
  if ans*h < n:
    ans += 1
else:
  ans = int(n/w)
  if ans*w < n:
    ans += 1

 
  
  
print(ans)

Submission status: Accepted

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

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

a = 0
b = 0
c = set()

for i in range(H+1):
    for j in range(W+1):
        if i*H+j*W-i*j >= N:
            c.add((i,j))

ans = min(set([n1+n2 for (n1,n2) in c]))
print(ans)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
Hcount = 0
Wcount = 0


list = [[0 for i in range(W)] for j in range(H)]

#if (W < H):
for k in range(W):
    Hcount = H*(k+1)
    if(Hcount >= N):
        Hcount = k+1
        break
        #exit()
    else:
        continue

#elif (W > H):
for l in range(H):
    Wcount = W*(l+1)
    if(Wcount >= N):
        Wcount = l+1
        break
        #exit()
    else:
        continue

print(min(Hcount,Wcount))

Submission status: Accepted

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)


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)

    # divisors.sort()
    return divisors


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def is_prime(n):
    if n == 1:
        return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


def modinv(a, mod):
    return modpow(a, mod - 2, mod)


def cnk(a, b):
    MOD = 10**9+7
    ret = 1
    for i in range(b):
        ret *= (a-i)
        ret %= MOD
        ret = ret * modinv(i+1, MOD) % MOD
    return ret




def main():
    # n, k, s = map(int, input().split())
    
    # v = n - k + 1
    # t = s // v
    # t2 = s % v
    # l = [t] * (v - 1) + [t + t2]
    # ansl = []
    # for i in range(n // len(l) + 1):
    #     ansl+=l
    
    
    
    # print(*ansl[:n])

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


    


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
#https://atcoder.jp/contests/keyence2020/tasks/keyence2020_a
# -*- coding: utf-8 -*-
H = int(input())
W = int(input())
N = int(input())
ans = 0
white = H*W
if H>=W :
  for i in range(H):
    ans += 1
    black = (i+1)*H
    if black >= N:
      break
elif W>H :
  for i in range(W):
    ans += 1
    black = (i+1)*W
    if black >= N:
      break
print(ans)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
num=0
ans=0
flag=0
x=0
if h>=w:
    l=h
    s=w
else:
    l=w
    s=h
for i in range(l):
    if flag==1:
        num+=s-x
        ans=1
    if flag==0:
        for j in range(s):
            num+=l
            ans+=1
            if num>=n:
                x=num
                flag=1
                break
    if num>=n:
        break
print(ans)

Submission status: Accepted

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

if (h>w) :
  rep=h
else :
  rep=w

i=0
while rep * i < n:
  i+=1

print(i)

Submission status: Accepted

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

h_count = 0
w_count = 0

for h_i in range(h):
	h_count += 1
	if n <= (h_i + 1) * w:
		break

for w_i in range(w):
	w_count += 1
	if n <= (w_i + 1) * h:
		break


if w_count > h_count:
	print(h_count)
else:
	print(w_count)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
div = max(H,W)
ans = (N + div - 1)//div
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:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


H = read_a_int()
W = read_a_int()
N = read_a_int()

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

Submission status: Accepted

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

once = H if H > W else W
print(math.ceil(N / once))

Submission status: Accepted

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


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

Submission status: Accepted

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

import math

if H > W:
	print(math.ceil(N / H))
else:
	print(math.ceil(N / W))

Submission status: Accepted

Solution code:
#import pysnooper
#import numpy
#import os,re,sys,operator
#from collections import Counter,deque
#from operator import itemgetter,mul
from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations
from sys import stdin,setrecursionlimit
#from bisect import bisect_left,bisect_right
#from copy import deepcopy
#import heapq
#import math
#import string
#from time import time
#from functools import lru_cache,reduce
from math import factorial,hypot
#import sys
#from fractions import gcd
setrecursionlimit(10**6)
input=stdin.readline

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

A = 0
i = 0
if H>=W:
  while A<N:
    A+=H
    i+=1
elif W>H:
  while A<N:
    A+=W
    i+=1

print(i)

Submission status: Accepted

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

long = H if H >= W else W

ans=0
i = 0
while True:
    if long * i >= N :
        ans = i
        break
    i += 1

print(i)

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

m = max(h, w)
ans = 0

for i in range(1, min(h,w)+1):
  ans = i
  if m * i >= n:
    break

print(ans)

Submission status: Accepted

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

M = max(H, W)
m = min(H, W)

cnt = 0

for i in range(m):
    cnt += M
    if cnt >= N:
        break

print(i + 1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

h = int(input())
w = int(input())
n = int(input())
x = max(h,w)

print (math.ceil(n / x))

Submission status: Accepted

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

cell_cnt=0
x=0

for x in range(h):
	cell_cnt+=w
	if cell_cnt>=n:
		break

cell_cnt = 0
for y in range(w):
	cell_cnt+=h
	if cell_cnt>=n:
		break

print(min(x+1,y+1))

Submission status: Accepted

Solution code:
n1 = int(input())#行
n2 = int(input())#列
n3 = int(input())#塗りつぶす

ans = int(0)

if n1 > n2:
  N = n3 / n1
  M = n3 // n1
  if N == M:
    ans = M
  else:
    ans = M + 1
else:
  N = n3 / n2
  M = n3 // n2
  if N == M:
    ans = M
  else:
    ans = M + 1

print(ans)

Submission status: Accepted

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

retu_count = 0
gyou_count = 0

a = max(h,w)

for i in range(1,h+1):
    if n-a*i <= 0:
        break
print(i)

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

H = int(readline())
W = int(readline())
N = int(readline())

m = max(H, W)

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

Submission status: Accepted

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

a=int(a)
b=int(b)
c=int(c)

if(a>=b):
	print(-(-c//a))
else:
	print(-(-c//b))

Submission status: Accepted

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

#field = [[0] * h] * w

h_len = h
w_len = w
num = 0
count_num = 0

while (num <= n):
    if (h == w):
        if (h_len > 0):
            num += h
            h_len -= 1
            count_num += 1
        else:
            num += w
            w_len -= 1
            count_num += 1
    elif (h > w):
        if (h_len > 0):
            num += h
            h_len -= 1
            count_num += 1
        else:
            num += w
            w_len -= 1
            count_num += 1
    elif (w > h):
        if (w_len > 0):
            num += w
            w_len -= 1
            count_num += 1
        else:
            num += h
            h_len -= 1
            count_num += 1
    
    if (num >= n):
        break

print(count_num)

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:
def countChange(inputNum, divNum):
    tmp = inputNum // divNum
    if inputNum % divNum != 0:
        tmp += 1

    return tmp

height = int(input())
width = int(input())
goal = int(input())

if height > width:
    divNum = height
else:
    divNum = width

ans = countChange(goal, divNum)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def S_():
    return input()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()
sys.setrecursionlimit(10**5)
input=lambda: sys.stdin.readline().rstrip()

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True

ans=0

H=I()
W=I()
n=I()
ans=inf

for i in range(H+1):
    for j in range(W+1):
        if i*W-j*H-i*j>=n:
            ans=min(ans,i+j)
            

for j in range(W+1):
    for i in range(H+1):
        if i*H-j*W-i*j>=n:
            ans=min(ans,i+j)

print(ans)

Submission status: Accepted

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

large, small = max(h, w), min(h, w)

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

Submission status: Accepted

Solution code:
import math as m

h=int(input())
w=int(input())
k=int(input())

large=max(h,w)
print(m.ceil(k/large))

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

num = n//max(h,w) if (n//max(h,w)+1)==n else (n//max(h,w)+1)

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

Submission status: Accepted

Solution code:
s=int(input())
t=int(input())
u=int(input())
tate=0
yoko=0
sum=0
count=0
for i in range(s+t):
  if sum+(s-tate)<sum+(t-yoko):
    sum+=(t-yoko)
    tate+=1
  else:
    sum+=(s-tate)
    yoko+=1
  count+=1
  if u<=sum:
    break
print(count)