Lyndon's Golf Contest 1 P2 - A Cube Problem

View as PDF

Submit solution


Points: 0 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
Python

Your friend needs you to help him golf his coding assignment! The problem is as follows:

Given an integer n (1n106), calculate the sum of the first n cubes: 13+23++n3.

Note: You may only submit to this problem in Python 3.

Input Specification

The first line of input contains a single integer n.

Output Specification

Output the sum of the first n cubes.

Scoring

Your score will be computed based on the length of your source code, the shorter the better. For an L-byte program,

  • if L34, you will receive the full 100 points.
  • if 35L37, you will receive 8010×(L35) points.
  • if 38L, you will receive 20.26(60L) points.

Sample Input

Copy
4

Sample Output

Copy
100

Comments

There are no comments at the moment.