My solution was based on defining groups of numbers by the 2 digits describing the month.
There is always 0 or 1 as 1st digit and 0 is followed by any non-zero digit and the digit 1 creates only 10,11,12.
So every 6-digit thrifty date YYMMDD belongs to one (111111 to more) of the 7 sets:
…………………….YY……….MM…………...DD……….# …….
SET 01 ……..00,01,10,11…...01,10,11…..01,10,11….4*3*3=36
SET 02 00,02,20,22…...02……...…..02,20,22 ..4*1*3=12 BR>
SET 03 00,03,30,33……..03,…...…..03,30…..... .4*1*2=8
SET 0d 00,0d,d0,dd; 4
SET 12 11,12,21,22 ……...11,12………11,12,21,22 .. 4*2*4=32
SET 13 11,13,31,33……….11,,,,,,,,,,,,,,,,11,13,..........4*1*2=8..
SET 1d 11,1d,d1,dd; ..4
36+12+8+24+32+8+48= 168 interim total
since 29/02 uses 3 digits and 31 for dd implies 13 for mm - no adjustments are needed for leap years and months with 31 days - only 11 qualifies for set13.
However number 111111 is generated 9 times (once in set01, set12, set13 and 6 times in set1d ) instead of one time only the answer should be 168 - 8 =160.
Easy as PofC!
This number included all thrifty dates in one century , including 991111 and 991119, not covered by puzzle's last date
|