tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,26 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
const start = "_###_##_#_#_#_#__#__"
|
||||
|
||||
func main() {
|
||||
g0 := []byte(start)
|
||||
g1 := []byte(start)
|
||||
fmt.Println(string(g0))
|
||||
last := len(g0) - 1
|
||||
for g := 0; g < 10; g++ {
|
||||
for i := 1; i < last; i++ {
|
||||
switch {
|
||||
case g0[i-1] != g0[i+1]:
|
||||
g1[i] = g0[i]
|
||||
case g0[i] == '_':
|
||||
g1[i] = g0[i-1]
|
||||
default:
|
||||
g1[i] = '_'
|
||||
}
|
||||
}
|
||||
fmt.Println(string(g1))
|
||||
copy(g0, g1)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue