Exemplo n.º 1
0
func isLeftTruncatablePrime(n int) bool {
	n = utils.ReverseInt(n)
	for n != 0 {
		if !utils.IsPrime(utils.ReverseInt(n)) {
			return false
		}
		n /= 10
	}
	return true
}
Exemplo n.º 2
0
func isPalindrome(n int) bool {
	return n == utils.ReverseInt(n)
}