求立方(函数)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
读入一个整数 n,输出 n³。
请把它写成一个函数,然后在 main 里调用。
输入格式
一行一个整数 n。
输出格式
一个整数,表示 n³。
样例输入
3
27
数据范围与提示
-1000 ≤ n ≤ 1000
负数的立方是负数,例如 (-2)³ = -8。 函数写成 long long cube(long long x),返回 x * x * x。
限制
1s, 256MiB
test
- Status
- Done
- Rule
- XCPC
- Problem
- 3
- Start at
- 2026-11-6 14:26
- End at
- 2026-11-6 16:26
- Duration
- 2 hour(s)
- Host
- Partic.
- 1