01 April 2017

shapeArea

My solution:
int shapeArea(int n) 
{
    return 2 * n * (n - 1) + 1;
}

Previous Next