[Rio-pm] [Golf] Fatorial
Fernando Oliveira
fernandocorrea em gmail.com
Segunda Fevereiro 1 06:12:52 PST 2010
Odeio fazer isso, mas vc me obrigou... vc esqueceu um espaço...
perl -E'$.*=$_ for 1..<>;say$.'
On Feb 1, 2010 11:58 AM, "Stefano Rodighiero" <stefano.rodighiero em gmail.com>
wrote:
2010/2/1 Alexei Znamensky <russoz em gmail.com>:
> perl -E'$n=1;$n*=$_ for 1..6;say $n'
Even nicer.
and it can be bent in the usual way
perl -E'$.*=$_ for 1..<>;say $.'
(also, this takes input)
s.
--
www.stefanorodighiero.net
_______________________________________________
Rio-pm mailing li...
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20100201/697a7971/attachment.html>
Mais detalhes sobre a lista de discussão Rio-pm