https://www.acmicpc.net/problem/6887
6887번: Squares
Gigi likes to play with squares. She has a collection of equal-sized square tiles. Gigi wants to arrange some or all of her tiles on a table to form a solid square. What is the side length of the largest possible square that Gigi can build? For example, wh
www.acmicpc.net
1
2
3
4
5
6
|
def sol(n):
return int(n**(1/2))
if __name__ == '__main__':
n = int(input())
print("The largest square has side length %d."%sol(n))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 6825 Body Mass Index (0) | 2022.12.22 |
---|---|
백준 26340 Fold the Paper Nicely (0) | 2022.12.22 |
백준 5357 Dedupe (0) | 2022.12.22 |
백준 26350 Good Coin Denomination (0) | 2022.12.22 |
백준 5300 Fill the Rowboats! (0) | 2022.12.22 |
댓글