Please specify how many positive integers display the following features:
a. The number is below 10^12.
b. It is a multiple of 225.
c. Its decimal representation involves only two distinct digits.
Provide a justification of your result..
(In reply to
re: Analytic solution by Charlie)
Thank you, Charlie.
I ran mine for power = 9 and 10; extrapolating the time came to an estimate of 50 minutes, and "about an hour" is what I think it took when I ran it at 12.
I haven't used Matlab, but I would have thought it would be faster than Python (laptop with 2.6 GHz CPU)
9 272
['25', '09', '03', '57', '06']
2.859375 seconds
10 493
['25', '09', '03', '57', '06', '05']
31.71875 seconds
|
Posted by Larry
on 2022-04-12 13:12:21 |