Back to task

101 symbols python2
Mon Feb 23 04:17:21 2015 Sait2000
m=[0]
for i in range(1,1+input()):m.append(1+min(m[-j*j]for j in range(1,1+int(i**0.5))))
print m[-1]


Leave a comment

Parsed as Markdown

Login to leave a comment