Cube Sum

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem types
Allowed languages
Java

Given a number, find the sum of the cube of all digits in the number.

Input

A positive integer n 1 \le n \le 99999.

Output

The sum of the cubes of all digits in the integer.

Sample Input

223

Sample Output

43

Comments

There are no comments at the moment.