equation for amount of squares in a grid
/** * I'm using my own versions of max and min because * Math package only has max() float64 and min() float64 */func max (a,b int) int { if a > b { return a } else { return b } return 0}func min (a,b int) int { if a < b { return a } else { return b } return 0}func count(n, m int) int { s, b := min(n, m), max(n, m) r := 0 for i := 1; i <= s; i++ { r += (s - i + 1) * (b - i + 1) } return r}func main() { fmt.Print(count(2,3));}