// reversed returns a new *big.Int with reversed digits. func reversed(n *big.Int) *big.Int { a := n.String() b := tools.ReversedString(a) c, _ := new(big.Int).SetString(b, 10) return c }
// isPalindrome checks whether the given *big.Int is a palindrome. func isPalindrome(n *big.Int) bool { a := n.String() b := tools.ReversedString(a) return a == b }