Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Egyptian fractions (Golf Anyone?)

by dewey (Pilgrim)
on Aug 25, 2006 at 23:04 UTC ( [id://569772]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Egyptian fractions (Golf Anyone?)
in thread Egyptian fractions

A modification of blokhead's idea... what golf can go without regular expressions? 72 strokes:
for($_=pop;/\//,$`;$_=$x*$`-$'.'/'.$'*$x){1while++$x<$'/$`;print"1/$x "}
I counted the line break as one character, is that kosher?
Update: I see also shmem had a similar thought, I had missed that before posting somehow.
Update again: Changed the title of this node to not be dumb. Sorry all, thanks for the feedback those who messaged me!
~dewey

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://569772]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.