https://www.acmicpc.net/problem/1789
ํ์ด
# ๋ฐฑ์ค 1789๋ฒ ๋ฌธ์ - ์๋ค์ ํฉ
n = int(input())
temp = 1
answer = 0
while True:
n -= temp
if n >= 0:
answer += 1
temp += 1
else:
print(answer)
break
'๐๏ธ Algorithm > ๐ฉ ๋ฐฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค] [Python] 7568๋ฒ_๋ฉ์น (0) | 2022.03.18 |
---|---|
[๋ฐฑ์ค] [Python] 13305๋ฒ_์ฃผ์ ์ (0) | 2022.03.16 |
[๋ฐฑ์ค] [Python] 1260๋ฒ_DFS์ BFS (0) | 2022.03.15 |
[๋ฐฑ์ค] [Python] 11651๋ฒ_๋์ด์ ์ ๋ ฌ (0) | 2022.03.14 |
[๋ฐฑ์ค] [Python] 10814๋ฒ_๋์ด์ ์ ๋ ฌ (0) | 2022.03.13 |