[Rio-pm] [Golf] Fatorial

Alexei Znamensky russoz em gmail.com
Segunda Fevereiro 1 05:48:36 PST 2010


$ perl -E'$_=6;$_*=$=while--$=;say'
8.32098711274139e+80

aparentemente não.

Já

perl -E'$n=1;$n*=$_ for 1..6;say $n'

é do mesmo tamanho que a do Stefano, mas sem os evil points ;-)

On Mon, Feb 1, 2010 at 11:45, Daniel de Oliveira Mantovani <
daniel.oliveira.mantovani em gmail.com> wrote:

> $=      The current page length (printable lines) of the currently
> selected output channel.  Default is 60.  Used with formats.
> (Mnemonic: = has horizontal lines.)
>
> Defina o valor que você quer com o tamanho da sua página corrente:
> perl -E'$_=60;$_*=$=while--$=;say'
>
> (Não sei se isso vale)
>
>
> On 1 February 2010 11:31, Stefano Rodighiero
> <stefano.rodighiero em gmail.com> wrote:
> > 2010/2/1 Fernando Oliveira <fernandocorrea em gmail.com>:
> >
> >> perl -E'$n=$_=6;$_*=$n while--$n;say'
> >
> > nice, you can gain a character (and evil points) using another
> > variable:
> >
> > perl -E'$!=$_=6;$_*=$!while--$!;say'
> >
> > s.
> >
> > --
> > www.stefanorodighiero.net
> > _______________________________________________
> > Rio-pm mailing list
> > Rio-pm em pm.org
> > http://mail.pm.org/mailman/listinfo/rio-pm
> >
>
>
>
> --
> "If you’ve never written anything thoughtful, then you’ve never had
> any difficult, important, or interesting thoughts. That’s the secret:
> people who don’t write, are people who don’t think."
> _______________________________________________
> Rio-pm mailing list
> Rio-pm em pm.org
> http://mail.pm.org/mailman/listinfo/rio-pm
>



-- 
Alexei Znamensky [russoz_gmail_com] [russoz.wordpress.com] [
www.flickr.com/photos/alexeiz]
"Though we live in trying times, we're the ones who have to try"
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20100201/3b02044b/attachment.html>


Mais detalhes sobre a lista de discussão Rio-pm