add new solutions

This commit is contained in:
kanna5 2026-01-05 16:48:03 +09:00
parent ca24d0a56a
commit 0c73608ce5
Signed by: kkyy
GPG key ID: 06332F3965E9B0CF
36 changed files with 791 additions and 0 deletions

View file

@ -0,0 +1,25 @@
package q1317
func noZero(n int) bool {
for ; n > 0; n /= 10 {
if n%10 == 0 {
return false
}
}
return true
}
func getNoZeroIntegers(n int) []int {
for i := 1; i <= n/2; i++ {
if !noZero(i) {
continue
}
j := n - i
if noZero(j) {
return []int{i, j}
}
}
return nil
}
var _ = getNoZeroIntegers