From 8aa88925e52870b183cd17770351796baf0a3df1 Mon Sep 17 00:00:00 2001 From: shillerben Date: Sun, 6 Jun 2021 08:06:55 -0500 Subject: [PATCH] Cleanup --- pe28/pe28.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/pe28/pe28.go b/pe28/pe28.go index d2614f2..c2f815c 100644 --- a/pe28/pe28.go +++ b/pe28/pe28.go @@ -4,45 +4,7 @@ import ( "fmt" ) -type Matrix struct { - arr []int - width int -} - -func (m Matrix) GetIndex(row, col int) int { - return m.arr[m.width*row+col] -} - -func (m *Matrix) SetIndex(row, col, val int) { - m.arr[m.width*row+col] = val -} - -func (m Matrix) String() { - for row := 0; row < m.width; row++ { - fmt.Println(m.arr[row*m.width : row*m.width+m.width]) - } -} - func Solve(_ []string) { - /* - //width := 1001 - width := 10 - num_numbers := width * width - mat := Matrix{ - arr: make([]int, num_numbers), - width: width, - } - i := num_numbers - cur_width - for i > 0; { - for y := width - 1; y >= 0; y-- { - mat.SetIndex(x, y, i) - i-- - } - } - //fmt.Println(mat) - mat.String() - */ max_width := 1001 sum := 1 for width := 1; width < max_width; width += 2 {