mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
744 B
40 lines
744 B
package main |
|
|
|
import "../../lib" |
|
|
|
func main() { |
|
oneArgs := []string{ |
|
"(johndoe)", |
|
")()", |
|
"([)]", |
|
"{2*[d - 3]/(12)}", |
|
} |
|
|
|
// 18 random tests ( at least half are valid) |
|
for i := 0; i < 3; i++ { |
|
oneArgs = append(oneArgs, |
|
"("+lib.RandASCII()+")", |
|
"["+lib.RandASCII()+"]", |
|
"{"+lib.RandASCII()+"}", |
|
"("+lib.RandAlnum()+")", |
|
"["+lib.RandAlnum()+"]", |
|
"{"+lib.RandAlnum()+"}", |
|
) |
|
} |
|
|
|
lib.ChallengeMain("brackets") |
|
|
|
for _, v := range oneArgs { |
|
lib.ChallengeMain("brackets", v) |
|
} |
|
|
|
multArg := [][]string{ |
|
{"", "{[(0 + 0)(1 + 1)](3*(-1)){()}}"}, |
|
{"{][]}", "{3*[21/(12+ 23)]}"}, |
|
{"{([)])}", "{{{something }- [something]}}", "there are"}, |
|
} |
|
|
|
for _, v := range multArg { |
|
lib.ChallengeMain("brackets", v...) |
|
} |
|
}
|
|
|