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:
def main():
    H = int(input())
    W = int(input())
    N = int(input())
    cnt = 0
    while N > 0:
        if H > W:
            N -= H
            W -= 1
        else:
            N -= W
            H -= 1
        cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
temp = 0
res = 0

if h < w:
  temp = h
  h = w
  w = temp

for i in range(w):
  if (i+1)*h >= n:
    res = i + 1
    break

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

Big = max(H,W)

i = 0

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
import math
from fractions import gcd
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok
#

def main():
    H,W,N=ii(),ii(),ii()
    if H>W:
        H,W=W,H
    s = 0
    for i in count(1):
        s += W
        if s>=N:
            print(i)
            break


main()

Submission status: Accepted

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

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

a = max(H, W)

ans = math.ceil(N / a) 

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())
st=0

if(W>H):
  st=W
  W=H
  H=st
  
count=0
sum=0

while not(sum>=N):
  count+=1
  sum+=H

print(count)

Submission status: Accepted

Solution code:
h= int(raw_input())
w= int(raw_input())
n= int(raw_input())
m=max([h,w])


for i in range(1,100000):
    n -= m
    if n <= 0:
        break
print(i)

Submission status: Accepted

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

Submission status: Accepted

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

use = 0
if H > W:
    use = H
else:
    use = W
ans = math.ceil( N / use)
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())

nuru = max(h,w)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
if w>=h:
  print( -(-n//w) )
else:
  print( -(-n//h) )

Submission status: Accepted

Solution code:
from math import ceil

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

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

Submission status: Accepted

Solution code:
import math
a,b,c = (int(input()) for _ in range(3))
print(math.ceil(c/max(a,b)))

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
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())
 
    if H >= W:
        h = H
        w = W
    else:
        h = W
        w = H
    
    ans = math.ceil(N / h)
    print(ans)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

a = 0
c = 0

if h > w:
    m = h
else:
    m = w
    
while a < n:
    a += m
    c += 1
    
print(c)

Submission status: Accepted

Solution code:
import math

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

v = max(h,w)

print(math.ceil(n/v))

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


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

    num = max(H, W)

    for i in range(num):
        if num * (i+1) >= N:
            print(i+1)
            sys.exit()


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
F = sys.stdin

H = int(F.readline().rstrip())
W = int(F.readline().rstrip())
N = int(F.readline().rstrip())

many = max(H, W)
ans = 0

ans = N // many + 1
if N % many == 0:
    ans = N // many

print(ans)

Submission status: Accepted

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

    print(ans)
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:
H=int(input())
W=int(input())

N=int(input())

X=0
if H>W:
    X=H

else:

    X=W
flag=True
counter=0
while flag:
    N=N-X
    counter+=1
    if N<=0:
        flag=False
print(counter)

Submission status: Accepted

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

maxi = max(h, w)
mini = min(h, w)

if (n/maxi == int(n/maxi)):
    print(n//maxi)
else:
    print(n//maxi + 1)

Submission status: Accepted

Solution code:
import math

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


if H > W :
    target = H
else: 
    target = W

print(math.ceil(N / target) )

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, w = input(), input()
print(0--input() / 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))
else:
    print(n//max(h,w)+1)

Submission status: Accepted

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

cnt = 0
if H < W:
    c = 0
    while c < N:
        cnt += 1
        c += W
else:
    c = 0
    while c < N:
        cnt += 1
        c += H

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin,stdout
H = int(stdin.readline())
W = int(stdin.readline())
N = int(stdin.readline())
print(N//max(H,W)+1) if N % max(H,W) != 0 else print(N//max(H,W))

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

main()

Submission status: Accepted

Solution code:
# coding utf-8
import math
h, w, n = (int(input()) for _ in range(3))
n_drawing = math.ceil(n / max(h, w))
print(n_drawing)

Submission status: Accepted

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

a = max(H, W)

ans = math.ceil(N/a)

print(ans)

Submission status: Accepted

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

m = min(h, w)

sum = 0
ans = 0
for i in range(m):
    sum += max(h, w)
    ans += 1
    if sum >= n:
        break
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

p = H if H>W else W

ans = (N//p)+1 if N%p!=0 else  N//p
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
x = int(input())

counter = 0
output = 0

while True:
    if counter >= x:
        break
    if a > b:
        counter += a
        output += 1
    else:
        counter += b
        output += 1

print(output)

Submission status: Accepted

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

x = H if H > W else W

print(-(-N // x))

Submission status: Accepted

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

tp = n%(max(h,w))
if tp == 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)
if n%m ==0:
  ans = n//m
else:
  ans = n//m + 1

print(ans)

Submission status: Accepted

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

if w > h:
    h, w = w, h

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

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
d=max(h,w)
ans=1
while d*ans<n:
  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:
    ans=n//h
  else:
    ans=n//h+1
else:
  if n%w==0:
    ans=n//w
  else:
    ans=n//w+1
print(ans)

Submission status: Accepted

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

    L = max(H,W)
    S = min(H,W)

    print(math.ceil(N / L))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

if H < W:
    count = N // W
    if N % W != 0:
        count +=1
else:
    count = N // H
    if N % H != 0:
        count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

total = 0;
ans = 0;
while total < n :
	ans += 1;
	total += max([h,w]);

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b):return (a*b) // fractions.gcd(a,b) #最小公倍数
def iin(): return int(input()) #整数読み込み
def isn(): return input().split() #文字列読み込み
def imn(): return map(int, input().split()) #整数map取得
def iln(): return list(map(int, input().split())) #整数リスト取得
def iln_s(): return sorted(iln()) # 昇順の整数リスト取得
def iln_r(): return sorted(iln(), reverse=True) # 降順の整数リスト取得
def join(l, s=''): return s.join(l) #リストを文字列に変換
def perm(l, n): return itertools.permutations(l, n) # 順列取得
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) # 順列の総数
def comb(l, n): return itertools.combinations(l, n) # 組み合わせ取得
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) #組み合わせの総数

H = iin()
W = iin()
N = iin()

loop_cnt1 = min(H,W)
loop_cnt2 = max(H,W)

ans = 0
cnt = 0
for i in range(loop_cnt1):
    cnt += 1  
    ans += loop_cnt2
    if ans >= N:
        break
if ans >= N:
    print(cnt)

Submission status: Accepted

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

ans = n / max(h, w)

if ans.is_integer():
    print(int(ans))

else:
    print(int(ans) + 1)

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
T=max(H,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())

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

Submission status: Accepted

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

ans=0
while N>0:
    if H>W:
        N-=H
        W-=1
    else:
        N-=W
        H-=1
    ans+=1

print(ans)

Submission status: Accepted

Solution code:
h=int(input())
w=int(input())
n=int(input())
num=0
count=0
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):
  p = H
else:
  p = W

total = 0
i = 0
while(total < N):
  total += p
  i += 1
  
print(i)

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

c = 0
count = 0
while(True):
    c += max(h,w)
    count += 1
    if c>=n:
        break
    if h >= w:
        w -= 1
    else:
        h -= 1
        
print(count)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
n = int(input())
if a<b : a,b=b,a
print((n+a-1)//a)

Submission status: Accepted

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

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

big = max(h,w)

if n % big == 0:
  ans = (n // big)
else:
  ans = (n // big) + 1

print(ans)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy
# import numpy as np
# import scipy
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
 
def inp(): # n=1
    return int(input())
def inpm(): # x=1,y=2
    return map(int,input().split())
def inpl(): # a=[1,2,3,4,5,...,n]
    return list(map(int, input().split()))
def inpls(): # a=['1','2','3',...,'n']
    return list(input().split())
def inplm(n): # x=[] 複数行
    return list(int(input()) for _ in range(n))
def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]]
    return [list(map(int, input().split())) for _ in range(n)]


def main():
    h = inp()
    w = inp()
    n = inp()
    if h < w:
        h,w = w,h
    for i in range(w+1):
        if i*h>=n:
            print(i)
            return

if __name__ == "__main__":
    main()

Submission status: Accepted

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

result = 0
count = 0

while True:
    if N <= count:
        break
    result += 1
    if H > W:
        count += H
        W -= 1
    else:
        count += W
        H -= 1

print(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

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
count =0
c=0
for _ in range(min):
    count += max
    c+=1
    if n<=count:
        break
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

import math

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    from sys import stdin, setrecursionlimit
    #setrecursionlimit(10**6)
    #r = stdin.readline()[:-1]
    #n = int(stdin.readline()[:-1])   
    #r = [stdin.readline() for i in range(n)]
    #t = [int(stdin.readline()) for i in range(n)]
    r = [int(stdin.readline()) for i in range(3)]
    
    if r[0] < r[1]:
        if r[2] % r[1] == 0:
            print(r[2] // r[1])
        else:
            print(r[2] // r[1] + 1)
    else:
        if r[2] % r[0] == 0:
            print(r[2] // r[0])
        else:
            print(r[2] // r[0] + 1)
    #'Yes', 'No', 'YES', 'NO', ':(', 'Yay!'
    #res = 0
    #a, b = map(int, r.split())
    #print()

if __name__ == '__main__':
    main()

Submission status: Accepted

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

long = W

if H > W:
    long = H

ans = math.ceil(N/long)

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

P = W if H < W else H

print(math.ceil(N/P))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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())

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

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

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

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import math


def solve(*args: str) -> str:
    h, w, n = map(int, args)

    return str(math.ceil(n/max(h, w)))


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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

a = max(H,W)

x = math.ceil(N/a)
print(x)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

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

	ans = 0
	tmp = max(H,W)
	#print(tmp)
	ans = -(-N // tmp)

	print(ans)


if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import math

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

l = max([h, w])
c = n / l 
print(math.ceil(c))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
h=int(input())
w=int(input())
N=int(input())
m=max(h,w)
n=min(h,w)
cnt=0
for i in range(n):
    cnt+=1
    N-=m
    if N<=0:
        break
if N>0:
    for i in range(m):
        cnt+=1
        M-=n
        if N<=0:
            break
print(cnt)

Submission status: Accepted

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

m_num = max(H, W)

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

Submission status: Accepted

Solution code:
from math import ceil

h = int(input())
w = int(input())
n = int(input())
ans = ceil(n / max(h, w))
print(ans)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

max_h_w = max([H, W])
min_h_w = max([H, W])

count = 0
for i in range(min_h_w):
    N -= max_h_w
    count += 1
    if N <= 0:
        break
print(count)

Submission status: Accepted

Solution code:
H = int(input())
W = int(input())
N = int(input())
for i in range(1000000):
    if max(H, W) * i >= N:
        print(i)
        exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	H = int(input())
	W = int(input())
	N = int(input())
	ans = H + W
	for i in range(H + 1):
		for j in range(W + 1):
			if H * W - i * j >= N:
				ans = min(ans, H - i + W - j)

	print(ans)


if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
a, b = max(h, w), min(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())


t = max(H, W)
c = 0
for i in range(10 ** 9):
    c = t * i
    if c >= N:
        break

print(i)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

choice = max(h,w)
i = 0

while i * choice < n:
    i += 1
print(i)

Submission status: Accepted

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

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

Submission status: Accepted

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

    ans = 0
    h, w = 0, 0
    while True:

        if H >= W and h != H:
            N -= H
            h += 1
        elif w != W:
            N -= W
            w += 1
            
        ans += 1

        if N <= 0:
            print(ans)
            exit()
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# keyence2020/keyence2020_a
import sys
from math import ceil

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    H = i2n()
    W = i2n()
    N = i2n()
    lgr = max(H, W)
    print(ceil(N / lgr))
    return

main()

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


    return 0

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

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

print(min([(n+h-1)//h, (n+w-1)//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)