Class Solution
java.lang.Object
g0401_0500.s0479_largest_palindrome_product.Solution
479 - Largest Palindrome Product.<p>Hard</p>
<p>Given an integer n, return <em>the <strong>largest palindromic integer</strong> that can be represented as the product of two <code>n</code>-digits integers</em>. Since the answer can be very large, return it <strong>modulo</strong> <code>1337</code>.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> n = 2</p>
<p><strong>Output:</strong> 987 Explanation: 99 x 91 = 9009, 9009 % 1337 = 987</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> n = 1</p>
<p><strong>Output:</strong> 9</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= n <= 8</code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
largestPalindrome
public int largestPalindrome(int n)
-