[Rio-pm] [Golf] Fatorial

Daniel de Oliveira Mantovani daniel.oliveira.mantovani em gmail.com
Segunda Fevereiro 1 05:56:10 PST 2010


Mas eu acho que isso não vale, deixo para vocês avaliarem.

On 1 February 2010 11:53, Daniel de Oliveira Mantovani
<daniel.oliveira.mantovani em gmail.com> wrote:
> errrr
> *Defina o valor que você quer com o tamanho da sua página corrente:*
>
> O Golf não diz como vc pode definir o valor, mude a variável $= para
> 10 e altere o $_ para 10 que terá o resultado do fatorial de 10, como
> o padrão da variável é 60, ficou assim: $_=60!
>
> perl -E'$_=60;$_*=$=while--$=;say'
>
> Por tanto o meu ainda é o menor.
>
> []'s
>
>
> 2010/2/1 Alexei Znamensky <russoz em gmail.com>:
>> $ perl -E'$_=6;$_*=$=while--$=;say'
>> 8.32098711274139e+80
>>
>> aparentemente não.
>>
>>>>
>> 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"
>>
>> _______________________________________________
>> 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."
>



-- 
"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."


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