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.
43 lines
743 B
43 lines
743 B
5 years ago
|
package main
|
||
|
|
||
5 years ago
|
import (
|
||
5 years ago
|
"lib"
|
||
5 years ago
|
)
|
||
5 years ago
|
|
||
5 years ago
|
func main() {
|
||
5 years ago
|
oneArgs := []string{
|
||
|
"(johndoe)",
|
||
|
")()",
|
||
|
"([)]",
|
||
|
"{2*[d - 3]/(12)}",
|
||
|
}
|
||
5 years ago
|
|
||
|
// 18 random tests ( at least half are valid)
|
||
|
for i := 0; i < 3; i++ {
|
||
5 years ago
|
oneArgs = append(oneArgs,
|
||
5 years ago
|
"("+lib.RandASCII()+")",
|
||
|
"["+lib.RandASCII()+"]",
|
||
|
"{"+lib.RandASCII()+"}",
|
||
|
"("+lib.RandAlnum()+")",
|
||
|
"["+lib.RandAlnum()+"]",
|
||
|
"{"+lib.RandAlnum()+"}",
|
||
5 years ago
|
)
|
||
5 years ago
|
}
|
||
|
|
||
5 years ago
|
lib.ChallengeMain("brackets")
|
||
5 years ago
|
|
||
|
for _, v := range oneArgs {
|
||
5 years ago
|
lib.ChallengeMain("brackets", v)
|
||
5 years ago
|
}
|
||
|
|
||
5 years ago
|
multArg := [][]string{
|
||
|
{"", "{[(0 + 0)(1 + 1)](3*(-1)){()}}"},
|
||
|
{"{][]}", "{3*[21/(12+ 23)]}"},
|
||
|
{"{([)])}", "{{{something }- [something]}}", "there are"},
|
||
|
}
|
||
5 years ago
|
|
||
|
for _, v := range multArg {
|
||
5 years ago
|
lib.ChallengeMain("brackets", v...)
|
||
5 years ago
|
}
|
||
|
}
|