| Name | Language | Tokens Sum | Tokens Part 1 | Tokens Part 2 | Last change | |
|---|---|---|---|---|---|---|
| 1 | Python | 148 | 72 | 76 | 19 days ago | |
| 2 | Ruby | 179 | 71 | 108 | 19 days ago | |
| 3 | C++ | 237 | 111 | 126 | 19 days ago | |
| 4 | Kotlin | 251 | 118 | 133 | 19 days ago | |
| 5 | Kotlin | 293 | 149 | 144 | 19 days ago | |
| 6 | Go | 309 | 153 | 156 | 18 days ago | |
| 7 | TypeScript | 314 | 138 | 176 | 18 days ago | |
| 8 | Python | 314 | 157 | 157 | 19 days ago |
packagemainimport("bufio""bytes""fmt""os")funcmain(){scanner:=bufio.NewScanner(os.Stdin)scanner.Scan()beams:=map[int]int{ bytes.IndexByte(scanner.Bytes(),'S'):1,}nbSplit:=0forscanner.Scan(){ row:=scanner.Bytes() newBeams:=make(map[int]int) forb:=rangebeams{ ifrow[b]=='^'{ newBeams[b-1]=1 newBeams[b+1]=1 nbSplit++ }else{ newBeams[b]=1 } } beams=newBeams}fmt.Println(nbSplit)}