### Random Post

### Recent Posts

### Recent Comments

Jim Randell on Enigma 457: Divided by ex… | |

geoffrounce on Puzzle 44: Men-only Mews | |

Jim Randell on Puzzle 44: Men-only Mews | |

Brian Gladman on Enigma 1053: Home truths | |

Jim Randell on Enigma 1053: Home truths |

### Archives

### Categories

- article (11)
- enigma (1,192)
- misc (3)
- project euler (2)
- puzzle (48)
- site news (47)
- tantalizer (51)
- teaser (3)

### Site Stats

- 186,589 hits

Advertisements

Here’s my original Perl code. It’s pretty straightforward and runs in 11ms.

Solution:The lower number is 109989.If you leave the program to run to completion (by removing the

laststatement), you also find that 219978 is the other possible answer.And here’s the same thing in Python. It runs in 51ms.