mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-07 01:44:56 +08:00
Update 1680 test
This commit is contained in:
@ -5,67 +5,67 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
type question5620 struct {
|
type question1680 struct {
|
||||||
para5620
|
para1680
|
||||||
ans5620
|
ans1680
|
||||||
}
|
}
|
||||||
|
|
||||||
// para 是参数
|
// para 是参数
|
||||||
// one 代表第一个参数
|
// one 代表第一个参数
|
||||||
type para5620 struct {
|
type para1680 struct {
|
||||||
n int
|
n int
|
||||||
}
|
}
|
||||||
|
|
||||||
// ans 是答案
|
// ans 是答案
|
||||||
// one 代表第一个答案
|
// one 代表第一个答案
|
||||||
type ans5620 struct {
|
type ans1680 struct {
|
||||||
one int
|
one int
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_Problem5620(t *testing.T) {
|
func Test_Problem1680(t *testing.T) {
|
||||||
|
|
||||||
qs := []question5620{
|
qs := []question1680{
|
||||||
|
|
||||||
{
|
{
|
||||||
para5620{1},
|
para1680{1},
|
||||||
ans5620{1},
|
ans1680{1},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
para5620{3},
|
para1680{3},
|
||||||
ans5620{27},
|
ans1680{27},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
para5620{12},
|
para1680{12},
|
||||||
ans5620{505379714},
|
ans1680{505379714},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
para5620{42},
|
para1680{42},
|
||||||
ans5620{727837408},
|
ans1680{727837408},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
para5620{24},
|
para1680{24},
|
||||||
ans5620{385951001},
|
ans1680{385951001},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
para5620{81},
|
para1680{81},
|
||||||
ans5620{819357292},
|
ans1680{819357292},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
para5620{66},
|
para1680{66},
|
||||||
ans5620{627730462},
|
ans1680{627730462},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("------------------------Leetcode Problem 5620------------------------\n")
|
fmt.Printf("------------------------Leetcode Problem 1680------------------------\n")
|
||||||
|
|
||||||
for _, q := range qs {
|
for _, q := range qs {
|
||||||
_, p := q.ans5620, q.para5620
|
_, p := q.ans1680, q.para1680
|
||||||
fmt.Printf("【input】:%v 【output】:%v\n", p, concatenatedBinary(p.n))
|
fmt.Printf("【input】:%v 【output】:%v\n", p, concatenatedBinary(p.n))
|
||||||
}
|
}
|
||||||
fmt.Printf("\n\n\n")
|
fmt.Printf("\n\n\n")
|
||||||
|
Reference in New Issue
Block a user