N is a 7-digit positive integer whose product of the digits is 20160.
Determine the probability that the sum of the digits of N is a perfect square.
(In reply to
re: Solution by Jer)
Yes, I absolutely misread the problem.
But after a correct reading of the problem and changing one line of code from
if isSquare(i):
to
if isSquare(sod(i)):
5040 28560 0.17647058823529413
The required probability is 0.17647058823529413
|
Posted by Larry
on 2022-08-20 08:13:24 |