29 lines
290 B
Go
29 lines
290 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"os"
|
||
|
|
"regexp"
|
||
|
|
"strconv"
|
||
|
|
)
|
||
|
|
|
||
|
|
func check(e error) {
|
||
|
|
if e != nil {
|
||
|
|
panic(e)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
f, err := os.Open("./four.txt")
|
||
|
|
defer f.Close()
|
||
|
|
check(err)
|
||
|
|
|
||
|
|
n_safe := 0
|
||
|
|
n_dampener_safe := 0
|
||
|
|
|
||
|
|
scanner := bufio.NewScanner(f)
|
||
|
|
for scanner.Scan() {
|
||
|
|
}
|
||
|
|
}
|