534

sub is_rotatable{ #23456789 123456789 123456789 123456789 123456789 1234 (local$_=$_[0])=~y/0125689347/0152968/;reverse eq$_[0] }

I transposed two digits in posting above.

P:\test>type junk.pl sub is_rotatable{ #23456789 123456789 123456789 123456789 123456789 1234 (local$_=$_[0])=~y/0125689347/0152986/;reverse eq$_[0] } printf "%s %s rotatable\n", $_, is_rotatable( $_ ) ? 'is' : 'not' for 33, 131, 141, 171, 25696925, 101, 88; P:\test>junk 33 not rotatable 131 not rotatable 141 not rotatable 171 not rotatable 25696925 is rotatable 101 is rotatable 88 is rotatable

48

P:\test>type junk.pl sub is_rotatable{ #23456789 123456789 123456789 123456789 12345678 (local$_=$_[0])=~y/2569347/5296/;reverse eq$_[0] } printf "%s %s rotatable\n", $_, is_rotatable( $_ ) ? 'is' : 'not' for 33, 131, 141, 171, 25696925, 101, 88; P:\test>junk 33 not rotatable 131 not rotatable 141 not rotatable 171 not rotatable 25696925 is rotatable 101 is rotatable 88 is rotatable

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

In reply to Re: (Challenge) Rotateable numbers by BrowserUk
in thread (Challenge) Rotateable numbers by FoxtrotUniform

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.