[백준] 13909번 창문 닫기

거북이·2023년 9월 18일
0

백준[실버5]

목록 보기
107/114
post-thumbnail

💡문제접근

  • 제곱수를 잘 활용하면 해결할 수 있는 문제

💡코드(메모리 : 31388KB, 시간 : 60ms)

import sys
input = sys.stdin.readline

N = int(input())

num = 1
tot = 1
while True:
    if num ** 2 <= N < (num + 1) ** 2:
       print(tot)
       break
    num += 1
    tot += 1

💡소요시간 : 9m

0개의 댓글