URL: https://leetcode.com/problems/count-total-number-of-colored-cells/ Signed-off-by: Matej Focko <me@mfocko.xyz>
3 lines
78 B
Kotlin
3 lines
78 B
Kotlin
class Solution {
|
|
fun coloredCells(n: Int): Long = 1L + 2L * n * (n - 1)
|
|
}
|