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

Home > Numbers
Giant sum of products (Posted on 2020-12-26) Difficulty: 3 of 5
Jim calculated the product of the non zero digits of each integer from 1 to 102020 and then he summed these 102020 products. Which number did he obtain?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Suspected answer without explanation | Comment 1 of 2
Suspected answer:  46^2020

When summing up to various powers of 10, I get the following results:
Sum to       Result
10 ^ 0  =  1
10 ^ 1  =  46
10 ^ 2  =  2116
10 ^ 3  =  97336
10 ^ 4  =  4477456
10 ^ 5  =  205962976
10 ^ 6  =  9474296896


----- code -----
def pod_no_zeros(n):
    """ Input an integer.  Returns the Product of the Digits  """
    aList = list(str(n))
    ans = 1
    for c in aList:
        if int(c) == 0:
            continue
        ans = ans * int(c)
    return ans

for expon in range(7):
    sum_of_pods = 0
    for i in range(1,10**expon+1):
        sum_of_pods += pod_no_zeros(i)
    print(10,'^',expon, '   ', sum_of_pods)

  Posted by Larry on 2020-12-26 14:43:27
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 (21)
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