### Random Post

### Recent Posts

### Recent Comments

geoffrounce on Enigma 440: Three X | |

Jim Randell on Enigma 1588: As easy as 1… | |

Jim Randell on Enigma 440: Three X | |

geoffrounce on Enigma 1106: Not a square… | |

Jim Randell on Tantalizer 458: Knifemen |

### Archives

### Categories

- article (11)
- enigma (1,156)
- misc (2)
- project euler (2)
- puzzle (39)
- site news (44)
- tantalizer (42)
- teaser (3)

### Site Stats

- 177,401 hits

Advertisements

Here’s my first attempt. It runs in 43ms, but I’m not entirely happy with it. I lifted the generator for Pythagorean triples from a Project Euler problem I was looking at.

Here’s a diagram to illustrate how I tackled the problem.

Solution:The dimensions of the sheet of paper are 37 x 66.Here’s a slightly modified approach. It generates all possible Pythagorean triples with a hypotenuse less than 50 up front, and then checks all pairs of them. This does away with the

exit()for termination, and hence checks all possible answers, instead of stopping at the first one. It runs in 37ms.I probably should have done this one in SQL, but here is some Python: