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: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if h>w:
	nBig = h
else:
    nBig = w
    
    
    
print(n,nBig)
ans = int(n/nBig)+1

print(ans)

Submission status: Wrong Answer

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

lo = max(h,w)
lp = min(h,w)

cnt = 0
tmp = 0
for i in range(h*w):
    if tmp < n and tmp+lo <= n:
        tmp += lo
        cnt += 1
    elif tmp < n and tmp+lo >= n:
        tmp += lp
        cnt += 1
    else:
        break
print(cnt)

Submission status: Wrong Answer

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
print(x+1)

Submission status: Wrong Answer

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

d = max(a,b)

e = c // d
f = c % d
if d == 0:
    print(e)
elif d != 0:
    print(int(e) + int(1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h = int(input())
w = int(input())
n = int(input())
if(h >= w):
    a = n // h + 0.999
    print(int(a // 1))
else:
    a = n // w + 0.999
    print(int(a // 1))

Submission status: Wrong Answer

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

lo = max(h,w)
lp = min(h,w)

cnt = 0
tmp = 0
for i in range(h*w):
    if tmp < n and tmp+lo <= n:
        tmp += lo
        cnt += 1
    elif tmp < n and tmp+lo >= n:
        tmp += lp
        cnt += 1
    elif tmp >= n:
        break

print(cnt)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
14
12
112

Submission status: Wrong Answer

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


sum = 0
d = 0
if h > w:
    d = h
elif w > h:
    d = w

for i in range(d):
    sum = sum + d
    if n <= sum:
        print(int(sum/d))
        break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

L = H
if W > H:
  L = W

if N % L == 0:
  ans = N/L
else:
  ans = N/L + 1
  
print('{:.0f}'.format(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H = 14
W = 12
N = 112

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

L = max(H, W)

for i in range(1, L+1):
  if N < L*i:
    break

print(i)

Submission status: Wrong Answer

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

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

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




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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(n):
    if a*i >= n:
        print(i)
        sys.exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if h >= w:
    cnt = int(n // h)
    if not isinstance(n // h, int):
        cnt += 1
else:
    cnt = int(n // w)
    if not isinstance(n // w, int):
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

m = max(H, W)

print(ceil(N // m))

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = n//h



bit = w - count

while count<n:
  if count>=n:
    print(count)
    break
  count += bit

Submission status: Wrong Answer

Solution code:
def main():
    h = int(input())
    w = int(input())
    n = int(input())
    if h <= w:
        high = w
    else:
        high = h
    for i in range(1, n):
        if high * i >= n:
            print(i)
            return


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

print(math.ceil(n)//w)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a=max(H,W)

print(N//a)

Submission status: Wrong Answer

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

large = max(H,W)

ans = int(N / large)+1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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//1 + 1))

Submission status: Wrong Answer

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

a = max(H,W)

x = int(N/a)
print(x)

Submission status: Wrong Answer

Solution code:
h = int(input())
w = int(input())
n = int(input())
if h < w:
  t = n / w
else:
  t = n / h
print(int(t))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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
    return ret


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

print(n//w+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
H,W,N = [int(input()) for i in range(3)]
o = 1
a = N / o
while a <= H or W:
  if H <= W and a > W:
      o += 1
  elif W <= H and a > H:
      o += 1
print(o)

Submission status: Time Limit Exceeded

Solution code:
H,W,N = [int(input()) for i in range(3)]
o = 1
a = N / o
while a <= H or W:
  if H < W and a > W:
      o += 1
  elif W < H and a > H:
      o += 1
print(o)

Submission status: Time Limit Exceeded

Solution code:
H,W,N = [int(input()) for i in range(3)]
o = 1
a = o * W
b = o * H
while a or b > N:
  if H < W and a < N:
      o += 1
  elif W < H and b > N:
      o += 1
print(o)

Submission status: Time Limit Exceeded

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

while N > 0:
  if H < W:
    N -= W
    ans += 1
    if N <= 0:
      break
  elif W < H:
    N -= H
    ans += 1
    if N <= 0:
      break
print(ans)

Submission status: Time Limit Exceeded

Solution code:
H, W, N = map(int, open(0).read().split())
ans = 0

while N > 0:
  if H < W:
    N -= W
    ans += 1
    if N <= 0:
      break
  elif W < H:
    N -= H
    ans += 1
    if N <= 0:
      break
print(ans)

Submission status: Time Limit Exceeded

Solution code:
H, W, N = map(int, open(0).read().split())
ans = 0

while N >= 0:
  if H < W:
    N -= W
    ans += 1
    if N <= 0:
      break
  elif W < H:
    N -= H
    ans += 1
    if N <= 0:
      break
print(ans)

Submission status: Time Limit Exceeded

Solution code:
H, W, N = map(int, open(0).read().split())
ans = 0

while N >= 0:
  if H < W:
    N -= W
    ans += 1
    if N <= 0:
      break
  elif W < H:
    N -= H
    ans += 1
    if N <= 0:
      break
print(ans)

Submission status: Accepted

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    h, w, n = int(input()), int(input()), int(input())
    print(min((n - 1) // h + 1, (n - 1) // w + 1))
resolve()

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
ans = n // max(h,w) if n % max(h,w) == 0 else n // max(h,w) + 1
print(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:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil,pi,factorial
    from operator import itemgetter
    def I(): return int(input())
    def MI(): return map(int, input().split())
    def LI(): return list(map(int, input().split()))
    def LI2(): return [int(input()) for i in range(n)]
    def MXI(): return [[LI()]for i in range(n)]
    def SI(): return input().rstrip()
    def printns(x): print('\n'.join(x))
    def printni(x): print('\n'.join(list(map(str,x))))
    inf = 10**17
    mod = 10**9 + 7
#main code here!
    h=I()
    w=I()
    n=I()
    ver=0
    hor=0
    ans=0
    while n>0:
        if h-hor>=w-ver:
            n-=(h-hor)
            ver+=1
            ans+=1
        else:
            n-=w-ver
            hor+=1
            ans+=1
    print(ans)



        
        
        
        
        
    
if __name__=="__main__":
    main()

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

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

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

Submission status: Accepted

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

if h > w:
  for i in range(w):
    blk += h
    cnt += 1
    if blk >= n:
      break
else:
  for j in range(h):
    blk += w
    cnt += 1
    if blk >= n:
      break

print(cnt)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

tmp1 = min(H, W)
tmp2 = max(H, W)

for i in range(tmp1):
  N = N - tmp2
  if N <= 0:
    print(i + 1)
    break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
c=0
ch=0
cw=0

while c<N:
    if H-cw>W-ch:
        c+=H-cw
        ch+=1
    else:
        c+=W-ch
        cw+=1

print(ch+cw)

Submission status: Accepted

Solution code:
A = int (input ())
B = int (input ())
N = int (input ())
if A < B:
  X = N//B
  if N%B == 0:
    print (X)
  else:
    print (X+1)
else:
  X = N//A
  if N%A == 0:
    print (X)
  else:
    print (X+1)

Submission status: Accepted

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

    a = max(h, w)

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import math
#import collections
#n,k = map(int, input().split( ))
#A = list(map(int, input().split( )))
h = int(input())
w = int(input())
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
i = 0
m = max(h,w)
while True:
    ans +=1
    i += m
    if i >= n:
        print(ans)
        break

Submission status: Accepted

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

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

if H <= W:
   f(W)
else:
   f(H)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def main():
    h, w, n = map(int, sys.stdin.read().split())
    print(-(-n // max(h, w)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  H=int(pin())
  W=int(pin())
  N=int(pin())
  t=max(H,W)
  if N%t==0:
    print(N//t)
  else:
    print(N//t+1)
  return 

main()

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a = max(ri(), ri())
print(math.ceil(ri()/a))

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())
m = int(input())
total = 0
if h < w:
  h,w = w,h
for i in range(w):
  total += h
  if total >= m:
    print(i+1)
    exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2020/08/16
# AtCoder Beginner Contest 030 - A

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

# Calc
ans = n // max(h, w)
if n % max(h, w) > 0:
    ans = ans + 1

# Output
print(ans)

Submission status: Accepted

Solution code:
x=int(input())
y=int(input())
z=max(x,y)
print(-int(input())//z*-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
H = int(input())
W = int(input())
N = int(input())
X = max(H, W)
Y = min(H, W)
count = 0
total = 0
for _ in range(Y):
    total += X
    count += 1
    if total >= N:
        print(count)
        sys.exit()
for _ in range(X):
    total += Y
    count += 1
    if ctotal >= N:
        print(count)
        break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H, W, N = map(int, open(0).read().split())
if H > W:
    H, W = W, H
print((N + W - 1) // W)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = input()
c = input()
d = int()
e = int()

if int(a) > int(b):
  d = int(a)
else:
  d = int(b)

e = int(c) // d
  
if int(c) % d != 0:
  e = e+1

print(e)

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:
    ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

i=1
while n > max(h,w)*i:
    i += 1
else: print(i)

Submission status: Accepted

Solution code:
H,W,N = map(int, open(0).read().split())

ans = 0
while N > 0:
    A = max(H, W)
    tmp = N // A
    N = N % A
    if tmp == 0 and N:
        N = 0
        ans += 1
        break
    if H == A:
        W -= tmp
    else:
        H -= tmp
    ans += tmp

print(ans)

Submission status: Accepted

Solution code:
H=int(input())
W=int(input())
N=int(input())
K=H
if K<W: K=W
sum = 0
ans= 0
for i in range(1,K+1):
  if sum < N:
    sum += K
    ans = i
    #print(ans, K)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
H, W, N = map(int,open(0))
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)
print((n+a-1)//a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def solve():
  H = int(input())
  W = int(input())
  N = int(input())
  ans = -(-N//max(H,W))
  return ans
print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

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

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

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    [h, w, n] = [int(readline().rstrip()) for _ in range(3)]
    print(math.ceil(n/max(h, w)))


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,w,n=[int(input()) for _ in range(3)]
m=max(h,w)
print(0--n//m)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,n=map(int,open(0).read().split());print(-(-n//max(a,b)))

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())
if h >= w and n%h != 0:
    print(n//h+1)
elif h >= w and n%h == 0:
    print(n//h)
elif w >= h and n%w != 0:
    print(n//w+1)
else:
    print(n//w)

Submission status: Accepted

Solution code:
a = [int(input()) for _ in range(3)]
num = a[2]/max(a[0], a[1])
if num.is_integer():
    print(int(num))
else:
    print(int(num)+1)

Submission status: Accepted

Solution code:
from math import ceil

H,W,N = map(int, open(0).read().split())
m = max(H,W)
print(ceil(N/m))

Submission status: Accepted

Solution code:
h = int(input())
w = int(input())
n = int(input())
print(int((n-1)/max(h, w))+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:
h, w, n = [int(input()) for _ in range(3)]
print((n - 1) // max(h, w) + 1)

Submission status: Accepted

Solution code:
H,W,N=[int(input()) for i in range(3)]
print(min((N+H-1)//H,(N+W-1)//W))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(H, W, N):
    c = 0
    b = 0
    L = max(H, W)
    while b < N:
        b += L
        c += 1
    return c
H = int(input())
W = int(input())
N = int(input())
print(solve(H, W, N))

Submission status: Accepted

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

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)

print(ans)