Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: (Golf) Fibonacci Strings

by japhy (Canon)
on Jul 20, 2001 at 02:12 UTC ( [id://98261]=note: print w/replies, xml ) Need Help??


in reply to (Golf) Fibonacci Strings

Here's my solution. It doesn't run your exact test program, because it uses $_. It's 74 chars. Oh, I also obfuscated it.
sub fib { $_=pop;$==$}=0;{s&^(.)\1{$=}(?!\1)&&&&($==($}+=++$=)-$=,redo)}''eq$_&& +$=>1 }

_____________________________________________________
Jeff japhy Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://98261]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found