leetcode479】的更多相关文章

Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindrome mod 1337. Example: Input: 2 Output: 987 Explanation: 99 x 91 = 9009, 9009 % 1337 = 987 Note: The…
public class Solution { public int LargestPalindrome(int n) { ) ; , n) - ; ; v > max / ; v--) { StringBuilder sb = new StringBuilder(); foreach (var c in v.ToString().Reverse()) { sb.Append(c); } long u = Convert.ToInt64(v.ToString() + sb.ToString())…