← Back to List

26941번: Pyramidbygge ↗

Solutions

Python 3
120 B | 120 chars
n = int(input())
s = 0
crt = 1

while s + (2 * crt - 1) ** 2 <= n:
  s += (2 * crt - 1) ** 2
  crt += 1

print(crt - 1)