All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Square Birthdays (Posted on 2007-11-29)
A date can be written as DD/MM/YY, so that for example 01/08/16 means 1 August 1916. But if you concatenate just the digits, 010816 happens to be a perfect square, as it is 104². Call such a day a "square day".

Adrian's grandfather was one of six cousins born on different square days in the same year, which was a leap year in the 20th century. All of them died on square days in leap years, and none of them lived to see age 99. Each of them except Adrian's grandfather died in the same month as his or her birthday.

What was Adrian's grandfather's date of birth?

 See The Solution Submitted by Charlie Rating: 3.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 Some Unanswered Questions | Comment 2 of 7 |
I concur with Dej Mar but had a different journey to get there (and a different journey to post this comment)
`Program written below produces these two data lists.The second is an alphabetical listing of the first.From that list it is relatively easy to pinpoint years and other dates.  One must note however that  "00" actually refers to "2000"; the program is not attentive to that detail.Contents of "sqdaylst.txt"04 102010404 116 104010816 236 106011236 364 142020164 436 144020736 576 174030276 676 176030976 704 202040804 876 224050176 976 226051076 1016 246060516 1156 266070756 1256 284080656 1304 302091204 1424 318101124 1524 332110224 1604 348121104 1744 362131044 1844 388150544 1904 448200704 2000 470220900 2100 480230400 2200 490240100 2300 510260100 2400 520270400 2500 530280900 2604 548300304 27Compilation after "alphalst.txt"  but duly editedto indicate solution.  "04" occurs 6 times, thusthe birth year.Different colours match the birth-death months.Note that some potential death dates occur more than once, and there are several dates not addressed; Charlie had to ask the right question!My solution? Yes, it is there.00 470 220900 2100 480 230400 2200 490 240100 2300 510 260100 2400 520 270400 2500 530 280900 2604 102 010404  104 202 040804  804 302 091204 1404 348 121104 1704 448 200704 2004 548 300304 2716 104 010816  216 246 060516 1124 318 101124 1524 332 110224 1636 106 011236  336 144 020736  544 362 131044 1844 388 150544 1956 266 070756 1256 284 080656 1364 142 020164  476 174 030276  676 176 030976  776 224 050176  976 226 051076 10DIM SHARED leap\$(50)CLSOPEN "sqdaylst.txt" FOR OUTPUT AS #1d = 1FOR a = 0 TO 9FOR b = 0 TO 9FOR c = 0 TO 9   x = 100 * a + 10 * b + c  Y = x * xAnniv\$ = LTRIM\$(STR\$(Y))   IF LEN(Anniv\$) = 5 THEN Anniv\$ = "0"     + Anniv\$year\$ = RIGHT\$(Anniv\$, 2)Month\$      = MID\$(Anniv\$, 3, 2)Day\$ = LEFT\$(Anniv\$, 2) 'Validate data and then print IF ((x > 99 AND INT(VAL(year\$) / 4) = VAL(year\$) / 4)    AND (VAL(Month\$) > 0 AND VAL(Month\$) < 13)         AND VAL(Day\$) < 32) THEN           x\$ = STR\$(x)           d\$ = STR\$(d)           PRINT year\$; x\$; " "; Anniv\$; d\$ 'Screen view           PRINT #1, year\$; x\$; Anniv\$; d\$  'Save to disk           d = d + 1 END IFNEXT  'cNEXT  'bNEXT  'aCLOSE      n = 0    OPEN "sqdaylst.txt" FOR INPUT AS #1    DO           LINE INPUT #1, leap\$(n)                     n = n + 1            LOOP UNTIL (EOF(1))    CLOSE     PRINT'Bubble SortFOR i = 0 TO n - 1   FOR j = 0 TO n - i - 1       IF leap\$(j + 1) < leap\$(j) THEN              Temp\$ = leap\$(j)              leap\$(j) = leap\$(j + 1)              leap\$(j + 1) = Temp\$       END IF   NEXTNEXTOPEN "alphalst.txt" FOR OUTPUT AS #1FOR p = 0 TO n        year\$ = LEFT\$(leap\$(p), 2)        x\$ = MID\$(leap\$(p), 3, 4)        Anniv\$ = MID\$(leap\$(p), 7, 6)        d\$ = RIGHT\$(leap\$(p), 2)        PRINT year\$; x\$; " "; Anniv\$; " "; d\$ 'rearranged data        PRINT #1, year\$; x\$; " "; Anniv\$; " "; d\$NEXTCLOSE`

Edited on November 29, 2007, 9:17 pm

Edited on November 29, 2007, 9:23 pm
 Posted by brianjn on 2007-11-29 17:34:36

 Search: Search body:
Forums (0)