I'd be curious to see which way of solving for the divisors is faster, yours or mine, or if they are comparable. Either way, yours is more readable and if I'd have thought of it (forgot to think of the geometric mean of a divisor and quotient being just the square root of the divided, giving you your upper bound) I'd have tried it and only resorted to mine if it wasn't efficient enough.
Awesome
I'd be curious to see which way of solving for the divisors is faster, yours or mine, or if they are comparable. Either way, yours is more readable and if I'd have thought of it (forgot to think of the geometric mean of a divisor and quotient being just the square root of the divided, giving you your upper bound) I'd have tried it and only resorted to mine if it wasn't efficient enough.
Thanks
Very nice solution
.
Thanks!
9,4,7,3,7
Random test cases include strings of fewer than 5 digits although insrtuctions say to expect 5 or more. - the same issue is with Python
Can anybody please give me a hint here?
My code fails at
Test.assert_equals(greatest_product("92494737828244222221111111532909999"), 5292)
.The input string can be represented as a 5-element consecutive numbers series:
What I'm getting with numpy:
So, according to this the max value is 2592 thus how can there be 5292? Am I missing something?
Can anyone provide a formula please?
Depth
For what does d state here for?