Back to task

96 symbols python2
Tue Aug 18 20:17:52 2015 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