PROBLEM 6
Easy

Cube a Number

Programming Basics · C#

</>
STATUS Not solved

TASK

Problem

#6

Given an integer `n`, output `n * n * n`. Print only the required answer; do not print prompts, labels, or debug text.

EXAMPLE

Example

Input
12
Output
1728

LIMITS

Constraints

- Input is syntactically valid for the task except where invalid input is deliberately being tested (for example a `TryParse`/validation exercise).
- Print only the required answer; do not add prompts, labels, debug text, or extra spaces/lines.
📖
LEARN Theory for this problem
+

This is a direct arithmetic transformation. Name the input values, translate the formula exactly into C# operators, store the intermediate result when it improves readability, and print only the final value. For **Cube a Number**, the concrete requirement is: Given an integer `n`, output `n * n * n`. Keep input parsing, the core operation, and output formatting separate so each part can be checked independently.

💡
NEED HELP? Hints
+

['This is a direct arithmetic transformation. Name the input values, translate the formula exactly into C# operators, store the intermediate result when it improves readability, and print only the final value.', 'Before coding, state this exact input-to-output rule: Given an integer `n`, output `n * n * n`.', 'Trace the public example by hand, then test the smallest input and the edge case most likely to change an index, branch, tie, or empty result.']

ANSWER Solution
+
using System;
class Program
{
    static void Main()
    {
        long n=long.Parse(Console.ReadLine());
        long result=n*n*n;
        Console.WriteLine(result);
    }
}