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

Home > Numbers
Three 3-digit Positive Integers (Posted on 2023-07-02) Difficulty: 3 of 5
Charmaine has written down three 3-digit positive integers which between them contains exactly 9 distinct digits.

Among these three positive integers:

  • There is at least one that is divisible by 2.
  • There is at least one that is divisible by 3.
  • There is at least one that is divisible by 4.
  • There is at least one that is divisible by 5.
  • There is at least one that is divisible by 6.
  • There is at least one that is divisible by 7.
  • There is at least one that is divisible by 8.
  • There is at least one that is divisible by 9.
In addition, it is known that all the three positive integers are divisible by 11.

What are the three 3-digit integers posited by Charmaine?

Note: Adapted from Enigma # 1776 which appeared in 'New Scientist' in 2013.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 3 of 5 |
Answer:   [165, 308, 792]

Call the concatenation abc a 3 digit number.
Since there are no 3 digit numbers divisible by 11 and with no repeat digits which end in zero, the number divisible by 5 must end in a 5
So all numbers with a 5 in the a or b position can be eliminated.
There are only 50 3 digit numbers with no repeat digits divisible by 11 with no 5s in the a or b position.
----------------
def checkdiv(alist):
    """ alist is a list of 3 integers
    if not div by 11, return False  
    if at least one number in alist is div by 2,3,...,9 return True """
    for a in alist:
        if a%11 != 0:
            return False
    counter = [0 for i in range(2,10)]
    for divisor in range(2,10):
        for n in alist:
            if n%divisor == 0:
                counter[divisor - 2] += 1
    if 0 in counter:
        return False
    return True
            
elevens = []
for a in range(1,10 ):
    if a == 5:
        continue
    for b in range(10):
        if b == 5:
            continue
        if a==b:
            continue
        for c in range(10):
            if a==c or b==c:
                continue
            x = 100*a+10*b+c
            if x%11 == 0:
                elevens.append(x)

from itertools import combinations
solutions = []
for comb in combinations(elevens,3):
    if checkdiv(comb):
        x = sorted(list(comb))
        if x not in solutions:
            solutions.append(x)

for s in solutions:
    t = ''.join(str(s[i])  for i in range (3))
    if len(t) == len(set(t)):
        print(s)


  Posted by Larry on 2023-07-02 20:27:16
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information