Back
Close
  • 394

Statement

The program:
A Rubik's Cube® is a cube composed of several mini-cubes which pivot around the center along 3 axes.

Your program must output the number of mini-cubes visible on a cube of the given size.

INPUT:
N an integer.

OUTPUT:
An integer for the number of mini-cubes visible on a NxNxN Rubik's Cube®.

CONSTRAINTS:
0 < N < 100

EXAMPLE:
Input
2
Output
8
 

A higher resolution is required to access the IDE