Skip to content

Sunday Times Teaser 3311 – Calling From Home

by BRG on 8 March 2026

by Andrew Skidmore

Published Sunday March 08 2026 (link)

Edna is charged a single digit number of pence for each call to a mobile. A smaller whole number of pence is charged for every minute or part minute for which each mobile call exceeds five minutes. She spent exactly an hour in real time on mobile calls with the shortest call being less than a minute and each of the other four calls rounding up to different prime numbers of minutes. Curiously, the product of the primes is a palindrome; the sum of its digits being a single digit odd number.

The total charge for the five calls was a palindromic number of pence. If I told you whether that number was odd or even, you would know what it was.

In increasing order, what are the two palindromic numbers?

From → Uncategorized

7 Comments Leave one →
  1. BRG permalink

  2. John Z. permalink

  3. BRG permalink

    Here is an alternative approach.

  4. JohnZ permalink

    Brian here is a version of your code above with simplification of lines 24 – 37 taking into account that for a palindrome to sum to an odd number, it must have an odd number of digits

  5. BRG permalink

    Yes, I missed that issue. Starting with the palindrome is a lot slower than the earlier alternative. However the speed can be competitive, albeit with a lot of additional code

  6. John Z. permalink

    Using Brian’s alternate approach, stop the search if one parity has one cost and the other more than one. This reduces execution time significantly while adding only two lines of code.

  7. John Z. permalink

    An amalgam of the two methods with various tweaks. The last two of three conditions in the ‘if’ statement of line 28 appear to be redundant but this is hard to prove, so: belt and braces.

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS