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

Home > Just Math
Divisible by 11,111 (Posted on 2008-10-02) Difficulty: 2 of 5
How many positive 10-digit integers of the form ABCDEFGHIJ, with non leading zeroes and each letter representing a different base 10 digit from 0 to 9, are divisible by 11,111 ?

Note : Try to solve this problem analytically, although computer program/ spreadsheet solutions are welcome.

See The Solution Submitted by K Sengupta    
Rating: 3.2500 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
My Python Solution Comment 7 of 7 |
Onze=11111
Nbr=1000000000
# find first multiple of 11111
# ie increment NBr by 1 and stop when you have a multiple of 11111
# ie reminder of Nbr didided by 11111=0
R=None
while R!=0:
R=Nbr%Onze
Nbr+=1
# FirstNbr is the first multiple of 11111 with 10 digits
CurrentMultiple=Nbr-1
print(CurrentMultiple) # print first multiple
Solutions=[] # make a list to store solutions
# now we will scan all multiples and see if they fulfill the ABCDEFGHIJ constraint
SolCount=0 # SolCount will count the solutions
while CurrentMultiple<10000000000:
# check if all digits are differrebnt
digits=set() # create a python set to store digits
for d in str(CurrentMultiple): # put all digits in the set"
digits.add(d)
if len(digits)==10: # if the length of the set is equal to 10, all digits are different
SolCount+=1 # so we have a new solution
Solutions.append(CurrentMultiple)
print(CurrentMultiple)
CurrentMultiple+=Onze
print(SolCount) # print Count of Solutions
Solutions.sort() # sort list of solutions
print(len(Solutions))
print(Solutions) # print Solutions

  Posted by jcbar on 2019-07-20 15:53:26
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 (18)
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