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