easyMathSorting 0 views

Maximum Product of Two Digits

You are given a positive integer n.

You are given a positive integer n.

Return the maximum product of any two digits in n.

Note: You may use the same digit twice if it appears more than once in n.

Example 1

Input: n = 31

Output: 3

Example 2

Input: n = 22

Output: 4

Example 3

Input: n = 124

Output: 8

Constraints

  • 10 <= n <= 10^9

Hints

Companies

No companies reported yet.

Discussion

Sign in to join the discussion.

Loading discussion...

Test results

No test cases yet.