Advertisement
2579. Count Total Number of Colored Cells
MediumView on LeetCode
2579.cs
C#
public class Solution
{
public long ColoredCells(int n)
{
return 1L * n * n + 1L * (n - 1) * (n - 1);
}
}Advertisement
public class Solution
{
public long ColoredCells(int n)
{
return 1L * n * n + 1L * (n - 1) * (n - 1);
}
}