Back to task

105 symbols perl
Fri Feb 27 09:51:48 2015 bluebear94
#!/usr/bin/perl -n
@m=(0);for$i(1..$_){$n=9;for$j(1..sqrt($i)){$p=$m[$i-$j*$j];$n=$p<$n?$p:$n}$m[$i]=1+$n}print $m[$#m],$/


Leave a comment

Parsed as Markdown

Login to leave a comment