[BOJ] 10250. ACM ํธํ (python)
๐๋ฌธ์
๐ช์์ด๋์ด
- ์ธต/ํธ ์ ํ๊ธฐ
- n % h == 0? ํ๋จ
- n % h == 0? ํ๋จ
ย | n%h | == 0 | > 0 |
---|---|---|---|
ย | ย | h์ธต | n % h์ธต |
ย | ย | n//hํธ | n//h+1ํธ |
1
2
3
4
5
6
7
8
9
10
T = int(input())
for _ in range(T):
h,w,n = map(int,input().split())
if n%h:
room = n//h + 1
floor = n%h
else:
room = n//h
floor = h
print(str(floor)+format(room,'02'))
This post is licensed under CC BY 4.0 by the author.
Comments powered by Disqus.