Project Euler > Problem 171 > Finding numbers for which the sum of the squares of the digits is a square. (Java Solution)

Problem:

For a positive integer n, let f(n) be the sum of the squares of the digits (in base 10) of n, e.g.

f(3) = 32 = 9,
f(25) = 22 + 52 = 4 + 25 = 29,
f(442) = 42 + 42 + 22 = 16 + 16 + 4 = 36

Find the last nine digits of the sum of all n, 0 [<] n [<] 1020, such that f(n) is a perfect square.


Solution:

31626

Code:
The solution may include methods that will be found here: Library.java .

public interface EulerSolution{

public String run();

}
We don't have code for that problem yet! If you solved that out using Java, feel free to contribute it to our website, using our "Upload" form.


No comments :

Post a Comment

Follow Me

If you like our content, feel free to follow me to stay updated.

Subscribe

Enter your email address:

We hate spam as much as you do.

Upload Material

Got an exam, project, tutorial video, exercise, solutions, unsolved problem, question, solution manual? We are open to any coding material. Why not upload?

Upload

Copyright © 2012 - 2014 Java Problems  --  About  --  Attribution  --  Privacy Policy  --  Terms of Use  --  Contact