File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change
1
+ data /* .big.txt
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ func (*methods) D1P1(input string) string {
13
13
var left , right []int64
14
14
for _ , line := range lines {
15
15
sides := strings .Split (line , " " )
16
+ if len (sides ) != 2 {
17
+ continue
18
+ }
16
19
l , _ := strconv .ParseInt (sides [0 ], 10 , 64 )
17
20
r , _ := strconv .ParseInt (sides [1 ], 10 , 64 )
18
21
left = append (left , l )
@@ -34,6 +37,9 @@ func (*methods) D1P2(input string) string {
34
37
var left , right []int64
35
38
for _ , line := range lines {
36
39
sides := strings .Split (line , " " )
40
+ if len (sides ) != 2 {
41
+ continue
42
+ }
37
43
l , _ := strconv .ParseInt (sides [0 ], 10 , 64 )
38
44
r , _ := strconv .ParseInt (sides [1 ], 10 , 64 )
39
45
left = append (left , l )
You can’t perform that action at this time.
0 commit comments