count-total-number-of-colored-cells 1.0.0
Count Total Number of Colored Cells
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1#include <bits/stdc++.h>
2
3using namespace std;
4
6{
7public:
8 long long coloredCells(int n)
9 {
10 long long m = n;
11 return (m * m) + ((m - 1) * (m - 1));
12 }
13};
14
15int main()
16{
17 cout << "output: " << Solution().coloredCells(3) <<'\n';
18 return 0;
19}
long long coloredCells(int n)
Definition main.cpp:8
int main()
Definition main.cpp:15