add new solutions

This commit is contained in:
kanna5 2025-12-25 14:22:40 +09:00
parent 475d438db4
commit 1433bf4850
17 changed files with 394 additions and 0 deletions

View file

@ -0,0 +1,18 @@
package q9
import "strconv"
func isPalindrome(x int) bool {
if x < 0 {
return false
}
str := strconv.FormatInt(int64(x), 10)
for i := range len(str) / 2 {
if str[i] != str[len(str)-1-i] {
return false
}
}
return true
}
var _ = isPalindrome