👉 N ÷ H 의 나머지가 0일 때를 고려한다.
import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T) :
H, W, N = map(int, input().split())
if N%H != 0 :
x = str(N % H)
if (N//H)+1 < 10 :
y = '0'+str((N // H) + 1)
elif (N//H)+1 >= 10 :
y = str((N // H) + 1)
elif N%H == 0 :
x = str(H)
if N//H < 10 :
y = '0'+ str(N//H)
elif N//H >= 10 :
y = str(N//H)
print(x+y)
import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T) :
h, w, n = map(int, input().split())
x = n % h
y = (n // h) + 1
if x == 0 :
x = h
y = n // h
print(str(x)+str(y).zfill(2))
#print(str(x)+str(y).rjust(2, "0"))
원하는 길이만큼 문자를 채우는 rjust([범위], [문자]),
'0'을 채우는 zfill()
"1".zfill(2)
>>> "01"
"11".zfill(2)
>>> "11"
"1".zfill(5)
>>> "00001"
"1".rjust(2, "0")
>>> "01"
"1".rjust(2, "a")
>>> "a1"
"1".rjust(5, "a")
>>> "aaaa1"