kt: add «2579. Count Total Number of Colored Cells»
URL: https://leetcode.com/problems/count-total-number-of-colored-cells/ Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
513547c2f2
commit
7ee0a7cce6
1 changed files with 3 additions and 0 deletions
3
kt/count-total-number-of-colored-cells.kt
Normal file
3
kt/count-total-number-of-colored-cells.kt
Normal file
|
@ -0,0 +1,3 @@
|
|||
class Solution {
|
||||
fun coloredCells(n: Int): Long = 1L + 2L * n * (n - 1)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue