Steward
分享是一種喜悅、更是一種幸福
程式語言 - LeetCode - C - 2579. Count Total Number of Colored Cells
題目:
解答:
1 2 3 4 5 6 7 8 9 10 | long long coloredCells ( int n) { int i = 0; long long cc = 1; for (i = 0; i < n; i++) { cc += (i * 4); } return cc; } |