#11 백준 2292번 파이썬
우보만리
- 고등학교 수열 시간에 풀이할만한 군수열 문제
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def line_num(n): | |
return 1 + 6*(n*(n+1)/2 - n) | |
a = int(input()) | |
line = 1 | |
while 1: | |
if line_num(line) >= a: # equal dropped | |
print(line) | |
break | |
line += 1 |