Skip to content

Commit 962c5e2

Browse files
committed
Mar 05
1 parent 704d51d commit 962c5e2

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Solution:
2+
def coloredCells(self, n: int) -> int:
3+
return 1 + 4 * n * (n-1) // 2
4+
5+
6+
def main():
7+
n = 1
8+
assert Solution().coloredCells(n) == 1
9+
10+
n = 2
11+
assert Solution().coloredCells(n) == 5
12+
13+
14+
if __name__ == '__main__':
15+
main()

2025-03-March-LeetCoding-Challenge/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| March 02 | [2570. Merge Two 2D Arrays by Summing Values](https://leetcode.com/problems/merge-two-2d-arrays-by-summing-values/) | Easy | Solved |
99
| March 03 | [2161. Partition Array According to Given Pivot](https://leetcode.com/problems/partition-array-according-to-given-pivot/) | Medium | Solved |
1010
| March 04 | [1780. Check if Number is a Sum of Powers of Three](https://leetcode.com/problems/check-if-number-is-a-sum-of-powers-of-three/) | Medium | Solved |
11-
| March 05 | []() | | |
11+
| March 05 | [2579. Count Total Number of Colored Cells](https://leetcode.com/problems/count-total-number-of-colored-cells/) | Medium | Solved |
1212
| March 06 | []() | | |
1313
| March 07 | []() | | |
1414
| March 08 | []() | | |
@@ -41,5 +41,5 @@
4141
| Level | Problems | Solved | Unsolved |
4242
| --- | --- | --- | --- |
4343
| Easy | 2 | 2 | 0 |
44-
| Medium | 2 | 1 | 1 |
44+
| Medium | 3 | 1 | 3 |
4545
| Hard | 0 | 0 | 0 |

0 commit comments

Comments
 (0)