feat(Go-Tool):2021/06/16 新增一个数拆分成N个数且N个数相加和等于这个数工具、测试方法

This commit is contained in:
Huangzj
2021-06-16 11:57:20 +08:00
parent 092ab58276
commit 9ba69e98d5
6 changed files with 254 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
/*
* @Author : huangZJ
* @Time : 2021/6/16 10:52
* @Description
*/
package splitNumToN
import (
"fmt"
"testing"
)
func TestSplitNumTo3(t *testing.T) {
for i := 4; i <= 17; i++ {
fmt.Println()
fmt.Println(fmt.Sprintf("当前随机数为%d", i))
for j := 0; j < 100; j++ {
fmt.Println()
SplitNumTo3(i)
}
fmt.Println()
}
}