Ice Balls
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
At the North Pole, a polar bear is teaching her cubs mathematics using ice spheres. She plans to create N spheres, each with a radius ranging from 1 to N. Your task is to help the bear calculate the total volume of ice, in cubic meters, required to make these spheres. Each sphere is formed from a cube whose edge length is equal to the diameter of the sphere.
Input Data
A single integer N, representing the number of ice spheres, where 1 ≤ N ≤ 5,000.
Output Data
An integer K, representing the total cubic meters of ice needed to create these ice spheres.
Example Explanation
For example, the calculation for spheres with radii 1, 2, and 3 is as follows: (8 + 64 + 216 = 288).
Examples
Input #1
Answer #1
Submissions 460
Acceptance rate 54%