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

print(N//max(H,W)+(not (N%max(H,W)==0)))

Submission status: Accepted

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

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

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

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())
if W<H:
  H,W=W,H
#Wが大きい
if N%W==0:
  print(N//W)
else:
  print(N//W+1)

Submission status: Accepted

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

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

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

print(out)

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

greater = max(h, w)

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sizeI = int(input())
sizeJ = int(input())
n = int(input())

mx = max(sizeI, sizeJ)
print((n + mx - 1) // mx)

Submission status: Accepted

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

Submission status: Accepted

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

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())
print(-(-N//max(H,W)))

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:
def main():
  H=int(input())
  W=int(input())
  N=int(input())
  if W>H:
    tmp=W
    W=H
    H=tmp
  for i in range(1,W+1):
    if H*i>=N:
      print(i)
      return 0
main()

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 as m

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

if H > W:
    target=H

print(m.ceil(N/target))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 18 20:52:41 2020

@author: masat
"""
import math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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 math
H=int(input())
W=int(input())
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

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

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
mx = max(h,w)
ans = 0
for i in range(h*w):

    if i * mx >= n:
        ans = i
        break
print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(a, b, c):
    big = max(a, b)
    if c % big == 0: return c // big
    else: return (c // big) + 1
    #return 1 + 2 + 3 - a - b
    #if a + b + c <= 21: return 'win'
    #else: return 'bust'



do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    #a, b, c = list(map(int, input().split()))
    # S = input().split()
    a = int(input())
    b = int(input())
    c = int(input())
    # T = input()
    print(sol(a, b, c))
    # S = input().strip()
    # print(sol(S))

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

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

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:
import math
h = int(input())
w = int(input())
n = int(input())
if h>= w:
    print(math.ceil(n/h))
else:
    print(math.ceil(n/w))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
H, W = max(H, W), min(H, W)

cnt = 0
while (True):
  if N > cnt:
    cnt += H
    ans += 1
  else:
    print(ans)
    break

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
a=max(h,w)
cnt=1
while True:
  if a*cnt>=n:
    print(cnt)
    break
  cnt+=1

Submission status: Accepted

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

Submission status: Accepted

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

bigger = max(H, W)

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

X=max([W,H])
Y=N//X
if X*Y==N:
  print(Y)
else:
  print(Y+1)

Submission status: Accepted

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

if N % H == 0:
    H_count = N // H
else:
    H_count = N // H + 1
    
if N % W == 0:
    W_count = N // W
else:
    W_count = N // W + 1


print(min(H_count, W_count))

Submission status: Accepted

Solution code:
import math

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

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

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

t = 0
ans = 0
for i in range(max(H, W)):
    t += max(H, W)
    ans += 1
    if t >= N:
        break

print(ans)

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

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:
import math

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

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

Submission status: Accepted

Solution code:

def solve(h,w,n):
    temp = max(h,w)
    if n % temp == 0:
        return n // temp
    else:
        return n // temp + 1

def main():
    h = int(input())
    w = int(input())
    n = int(input())
    print(solve(h,w,n))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import floor, ceil
inputs = sys.stdin.readlines()

h = int(inputs[0])
w = int(inputs[1])
n = int(inputs[2])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2020/01/18
# キーエンス プログラミング コンテスト 2020 - A

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

# Calc
if h > w:
    wkv = h
else:
    wkv = w

ans = int(n / wkv) + 1

if (n % wkv) == 0:
    ans = ans - 1

# Output
print(ans)

Submission status: Accepted

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

L = max(H, W)

if N // L == N / L:
    print(N // L)
else:
    print((N // L) + 1)

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

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

H = ir()
W = ir()
N = ir()

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

Submission status: Accepted

Solution code:
x=int(input())
y=int(input())
z=int(input())
if x<=y:
  b=z//y
  c=z%y
else:
  b=z//x
  c=z%x
if c!=0:
  b+=1
print(str(b))

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

x = max(h, w)
a, b = divmod(n, x)
b = 0 if b == 0 else 1
print(a + b)

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

# fact(int)
def fact(n):
  if(n == 1):
    return 1
  else:
    return (n * fact(n - 1))

# gcd(int,int)
def gcd(a,b):
  if a == 0:
    return b
  elif b == 0:
    return a
  else:
    return gcd(b,a % b)

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

# qsort(array[])
def qsort(seq):
  if len(seq) < 1:
      return seq
  pivot = seq[0]
  left = []
  right = []
  for x in range(1, len(seq)):
    if seq[x] <= pivot:
        left.append(seq[x])
    else:
        right.append(seq[x])
  left = qsort(left)
  right = qsort(right)
  foo = [pivot]
  return (left + foo + right)

# = map(int, input().split())
# = int(input())
# = raw_input().split()
# = list(int(i) for i in input().split())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

bigger = max(H,W)

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

Submission status: Accepted

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

if h > w:
    m = -(-n // h)
else:
    m = -(-n // w)

print(m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
a=0
ans=0
paint=max(h,w)
while a<n:
    a+=paint
    ans+=1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import queue
import copy
import math

# そのまま入力文字列の入力
h = int(input())
w = int(input())
n = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
a = b = 100000000
for i in range(h+1):
    if n <= i * w:
        a = i
        break
for i in range(w+1):
    if n <= i * h:
        b = i
        break
print(min(a,b))

Submission status: Accepted

Solution code:
import math

h = int(input())
w = int(input())
n = int(input())
x = max(h, w)
ans = math.ceil(n / x)
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, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def S(): return input()


def MI(): return map(int, input().split())


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['No', 'Yes']
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    H = I()
    W = I()
    N = I()

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


if __name__ == '__main__':
    main()

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 copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import bisect
import sys
input = sys.stdin.readline

setrecursionlimit(1000000)

def main():
	h,w,m = int(input()),int(input()),int(input())
	h,w = max(h,w),min(h,w)
	print(math.ceil(m/h))

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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

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

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math


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

large = max(H, W)

ans = math.ceil(N / large)
print(ans)

Submission status: Accepted

Solution code:
import numpy as np
H = int(input())
W = int(input())
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = 2000
H = int(input())
W = int(input())
N = int(input())
for nh in range(H+1):
    for nw in range(W+1):
        white = (H-nh)*(W-nw)
        if H*W-white>=N:
            ans = min(ans, nh+nw)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

n=int(input())
a=max(h,w)
count=1
while a*count<n:
    count+=1

print(min(count,h,w))

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
#!python3

iim = lambda: map(int, input().rstrip().split())

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

    x = max(H, W)
    a, b = divmod(N, x)
    if b:
        a += 1
    print(a)

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
import math

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

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

Key1()

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())
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())
k = max(h,w)
for i in range(k):
    n = n -k
    if n <= 0:
        print(i+1)
        exit()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

blacked = 0
larger_rows = max(H, W)
ans = 0

while blacked < N:
    blacked += larger_rows
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
import math

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

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

k = max(a, b)
ans = c//k
if c%k:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

A()

Submission status: Accepted

Solution code:
''' Hey stalker :) '''
INF = 10**10
def main():
    #print = out.append
    ''' Cook your dish here! '''
    k = max(get_int(), get_int())
    n = get_int()
    print((n+k-1)//k)


''' Pythonista fLite 1.1 '''
import sys
from collections import defaultdict, Counter
from bisect import bisect_left, bisect_right
#from functools import reduce
#import math
#input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
out = []
get_int = lambda: int(input())
get_list = lambda: list(map(int, input().split()))
main()
#[main() for _ in range(int(input()))]
#print(*out, sep='\n')

Submission status: Accepted

Solution code:
def main():
    H = int(input())
    W = int(input())
    N = int(input())
    long = max(H, W)
    cnt = N // long
    if N % long != 0:
        cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

longer = max(H, W)

count = int(N / longer)
if N % longer > 0:
    count += 1

print(count)

Submission status: Accepted

Solution code:
def num():
    return int(input())
def nums():
    return list(map(int,input().split()))

import itertools as iter
import math
import fractions
from functools import reduce

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

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

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

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

Submission status: Accepted

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

cnt = 0
while N > 0:
    N -= max(H, W)
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8
h = int(input())
w = int(input())
n = int(input())
l = max(h,w)
s = 0
ans = 0
while s < n:
    ans += 1
    s += l
print(ans)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

_max=max(h,w)
_min=min(h,w)
ans=0

for i in range(_min):
    n-=_max
    ans+=1
    if n<=0:
        print(ans)
        exit()
    
for i in range(_max):
    n-=_min
    ans+=1
    if n<=0:
        print(ans)
        exit()

Submission status: Accepted

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

Submission status: Accepted

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

if h >= w:
    ans = -(-n//h)
else:
    ans = -(-n//w)

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

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

a = min(H, W)
b = max(H, W)

c = 0

for i in range(a):
    c += 1
    N -= b
    if N <= 0:
        print(c)
        quit()

Submission status: Accepted

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

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

H = INT()
W = INT()
N = INT()
c = 0
ans = 0
while N > c:
    c += max(H, W)
    ans += 1
print(ans)

Submission status: Accepted

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

M = max(H, W)
ans = N//M

if N%M == 0:
    print(ans)
else:
    print(ans + 1)

Submission status: Accepted

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

ans = float('INF')
for i in range(0, h+1):
    for j in range(0, w+1):
        if i*h + j*w >= n:
            ans = min(ans, i+j)
print(ans)

Submission status: Accepted

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

buf=max(h,w)

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

Submission status: Accepted

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

from math import ceil

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

h = ni()
w = ni()
n = ni()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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