Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 65f97b6

Browse files
committed
2579
1 parent 50f2237 commit 65f97b6

File tree

1 file changed

+12
-0
lines changed
  • Medium/2579. Count Total Number of Colored Cells

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
class Solution
3+
{
4+
/**
5+
* @param Integer $n
6+
* @return Integer
7+
*/
8+
public function coloredCells($n)
9+
{
10+
return 1 + 2 * $n * ($n - 1);
11+
}
12+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /