Ryan-

I got a chain letter two weeks back that claimed that 20:02 20/02 2002 was a miraculous phenomenon that has only happened once before and won't ever happen again... not sure whether they meant simply the date being a palindrome or, more likely, the fact that the date can be split by whitespace in 3 identical palindromes. Well, I didn't believe it, so i wrote this script:

http://www.parseerror.com/perl/date_palindrome.pl
http://www.parseerror.com/perl/date_palindrome.txt (in case your browser doesn't like .pl files)

Which finds a total of 1164 palindromes between 1001-3003 AD. Of these, 4 turn out to be the "three identical palindromes"...

10:01 10/01 1001
11:11 11/11 1111
20:02 20/02 2002
21:12 21/12 2112

Anywho, all my results are included in the file and the source code is alot shorter and simpler than what you have, though it does take a while for the script to chug through all the dates from 1001-3003 AD.

Hope someone finds this interesting... i figured i could do it with a one-liner, but was suprirsed to find out how complex this actual problem was.

ryan aka pizza_milkshake

In reply to Re: Symmetrical Date Golf by Anonymous Monk
in thread Symmetrical Date Golf by ryan

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.