package main
import (
"fmt"
"strconv"
)
func getnums() []int {
ret := make([]int, 0)
for i := 1; i <= 4; i++ {
for j := 1; j <= 4; j++ {
for k := 1; k <= 4; k++ {
if i != j && j != k && i != k {
ele := fmt.Sprintf("%d%d%d", i, j, k)
intEle, _ := strconv.Atoi(ele)
ret = append(ret, intEle)
}
}
}
}
return ret
}
func main() {
fmt.Println(getnums())
}
有疑问加站长微信联系(非本文作者)