Back to task

269 symbols perl
Sun Nov 13 04:30:28 2016 Sait2000
#!/usr/bin/perl -p
%h=qw|/ -1 \ 1|;$s=$i if/@/;$a[$i++]=$_;sub u{my$u;$u+=$_ for@_;$u}sub c{my($j,$p,$v,$k,$q)=@_;my$l=substr$a[$j],$p,$v;my$r=$l=~/^ *(\S) /?c($j+$h{$1},$p,$v):u(@d=$l=~/\d+/g);$r+=1/(1/c($j-1,$k=$p+$-[0],$q=length$&)+1/c($j+1,$k,$q))while$l=~/< +>/g;$r}}{$_=c($s,0,99)


Leave a comment

Parsed as Markdown

Login to leave a comment