[백준]B3-10250

py_code·2021년 1월 1일
0

백준-브론즈3

목록 보기
24/38

test = int(input())
for i in range(test):
    h,w,n = map(int, input().split())
    index_w, index_h = divmod(n,h)
    if index_h ==0:
        print(str(h) + str(index_w).zfill(2))
    else:
        print(str(index_h) + str(index_w+1).zfill(2))

n이 h의 배수일 때를 주의해서 조건 분기를 해줘야 함

profile
개발자를 꿈꿉니다.

0개의 댓글