bumpsoo 2025-03-05 13:05:16 +00:00
parent 807b1a2d7e
commit c58936690d

View file

@ -0,0 +1,8 @@
# https://leetcode.com/problems/count-total-number-of-colored-cells
class Solution:
def coloredCells(self, n: int) -> int:
if n == 1:
return 1
return (n - 1) ** 2 + n ** 2