Back to task

95 symbols python2
Fri Jan 15 21:45:29 2016 Sait2000
m=[0]
for i in range(1,1+input()):m+=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