Back to task

94 symbols python2
Sat Jan 16 18:06:47 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[i]


Leave a comment

Parsed as Markdown

Login to leave a comment