Skip to content

Commit f4c0c38

Browse files
committed
2579. Count Total Number of Colored Cells
1 parent ec0b869 commit f4c0c38

File tree

1 file changed

+6
-0
lines changed
  • Count Total Number of Colored Cells

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package kata
2+
3+
func coloredCells(n int) int64 {
4+
k := int64(n)
5+
return k*k + (k-1)*(k-1)
6+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy