8000 Time: 0 ms (100%), Space: 7.9 MB (60.59%) - LeetHub · karygauss03/Leetcode-Solutions@3565bec · GitHub
[go: up one dir, main page]

Skip to content

Commit 3565bec

Browse files
committed
Time: 0 ms (100%), Space: 7.9 MB (60.59%) - LeetHub
1 parent 2b31bb3 commit 3565bec

File tree

1 file changed

+6
-0
lines changed

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+
class Solution {
2+
public:
3+
long long coloredCells(int n) {
4+
return 1LL + (long long)n * (long long)(n - 1) * 2LL;
5+
}
6+
};

0 commit comments

Comments
 (0)
< 2947 /div>
0