Function to return the count of possible triangles
def noOfTriangles ( n ) : NEW_LINE INDENT y = 4 * n NEW_LINE return ( ( y * ( y - 2 ) * ( y - 1 ) ) - ( 4 * n * ( n - 2 ) * ( n - 1 ) ) ) // 6 NEW_LINE DEDENT