Math
3536. Maximum Product of Two Digits
The answer is the product of the two largest digits in n, and nothing about the rest of the number matters — so I never enumerate the pairs the examples walk through. One pass over the digits keeps a running top-two, and I multiply them at the end.
Loading…