Back
Close
  • 302

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
 
Solve it

A higher resolution is required to access the IDE

codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants