1
13 symbols pyth
Sat Oct 29 17:31:20 2016 Sait2000
@`4432133%Q13
2
14 symbols pyth
Sat Oct 29 17:29:16 2016 Sait2000
@"4432133"%Q13
3
89 symbols python2
Sun Jul 24 14:15:19 2016 Sait2000
m=[0]
for _ in m*input():m+=~-max(m[-j*j]for j in range(-int(len(m)**.5),0)),
print-m[~0]
4
91 symbols python2
Sun Jul 24 14:12:33 2016 Sait2000
m=[0]
for _ in[0]*input():m+=~-max(m[-j*j]for j in range(-int(len(m)**0.5),0)),
print-m[-1]
5
92 symbols python2
Sun Jul 24 14:07:31 2016 Sait2000
m=[0]
for _ in[0]*input():m+=~-max(m[-j*j]for j in range(1,1+int(len(m)**0.5))),
print-m[-1]
6
94 symbols python2
Sat Jan 16 18:06:25 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]
7
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]
8
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]
9
95 symbols python3
Sat Oct 29 16:13:42 2016 Sait2000
m=[0]
for _ in m*int(input()):m+=-~min(m[-j*j]for j in range(-int(len(m)**.5),0)),
print(m[~0])
10
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]
11
96 symbols pyth
Sat Oct 29 16:50:16 2016 Sait2000
ev%"eval('m.__iadd__(-~min(m[-j*j]%srange(-int(len(m)**.5),0))%sm*%s)',%s)"[J"for j in "JzXH\m]0
12
97 symbols pyth
Sat Oct 29 16:46:02 2016 Sait2000
ev%"eval('m.__iadd__(-~min(m[-j*j]for j in range(-int(len(m)**.5),0))for _ in m*%s)',{'m':[0]})"z
13
99 symbols perl
Fri Feb 27 10:10:02 2015 bluebear94
#!/usr/bin/perl -n
@m=(0);for$i(1..$_){$n=9;for$j(1..$i**.5){$p=$m[$i-$j*$j];$n=$p<$n?$p:$n}$m[$i]=$n+1}print$m[$#m]
14
100 symbols perl
Fri Feb 27 10:09:16 2015 bluebear94
#!/usr/bin/perl -n
@m=(0);for$i(1..$_){$n=9;for$j(1..$i**.5){$p=$m[$i-$j*$j];$n=$p<$n?$p:$n}$m[$i]=$n+1}print $m[$#m]
15
100 symbols pyth
Sat Oct 29 16:43:24 2016 Sait2000
v%"eval('m.__iadd__(-~min(m[-j*j]for j in range(-int(len(m)**.5),0))for _ in m*%s)[-1]',{'m':[0]})"z
16
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]
17
103 symbols pyth
Sat Oct 29 17:05:54 2016 Sait2000
=Y]0ev%"eval('Y.__iadd__(-~min(Y[-j*j]%srange(-int(len(Y)**.5),0))%sY*%s)',environment)"[J"for j in "Jz
18
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],$/
19
105 symbols pyth
Sat Oct 29 16:35:05 2016 Sait2000
 v%"exec('for _ in m*%s:m+=-~min(m[-j*j]for j in range(-int(len(m)**.5),0)),\\nprint(m[~0])',{'m':[0]})"z
20
105 symbols pyth
Sat Oct 29 16:42:11 2016 Sait2000
 v%"exec('m+=(-~min(m[-j*j]for j in range(-int(len(m)**.5),0))for _ in m*%s)\\nprint(m[~0])',{'m':[0]})"z
21
107 symbols python3
Sat Oct 29 16:15:38 2016 Sait2000
exec('''m=[0]
for _ in m*int(input()):m+=-~min(m[-j*j]for j in range(-int(len(m)**.5),0)),
print(m[~0])''')
22
108 symbols perl
Fri Feb 27 09:50:53 2015 bluebear94
#!/usr/bin/perl -n
@m=(0);for$i(1..$_){$n=9999;for$j(1..sqrt($i)){$p=$m[$i-$j*$j];$n=$p<$n?$p:$n}$m[$i]=1+$n}print $m[$#m],$/
23
112 symbols pyth
Sat Oct 29 16:31:20 2016 Sait2000
 v"exec('for _ in m*int(input()):m+=-~min(m[-j*j]for j in range(-int(len(m)**.5),0)),\\nprint(m[~0])',{'m':[0]})
24
115 symbols pyth
Sat Oct 29 16:29:25 2016 Sait2000
 v"exec('''for _ in m*int(input()):m+=-~min(m[-j*j]for j in range(-int(len(m)**.5),0)),
print(m[~0])''',{'m':[0]})"
25
698 symbols perl
Sun Feb 22 16:18:23 2015 Logioniz
#!/usr/bin/perl

use strict;
use warnings;

use constant MAX_ANS => 100_000;

my $inp = <STDIN>;

my @ans = (0, 1);
my @sqrs = (1);

my $n = 90_000;
my $not_max = 1;

for my $i (2 .. $n) {
  my $t = int(sqrt($i));
  if ($t * $t == $i) {
    $ans[$i] = 1;
    push @sqrs, $i;
    next;
  }

  my $cur_ans = MAX_ANS;
  my $max_sqr = 0;
  for my $sqr (@sqrs) {
    if ($ans[$i - $sqr] + 1 <= $cur_ans) {
      $cur_ans = $ans[$i - $sqr] + 1;
      $max_sqr = $sqr;
    }
  }

  $ans[$i] = $cur_ans;

  # if ($max_sqr != $sqrs[-1]) {
  #   print "$i: ans $cur_ans, cur_max_sqr $max_sqr, max_sqr $sqrs[-1]", $/;
  # }
}

# print $/,$/;
print $ans[$inp], $/;

# for my $i (1 .. $#ans) {
#   print "$i: $ans[$i]", $/;
# }