You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: project_euler/problem_030/sol1.py
+19-13Lines changed: 19 additions & 13 deletions
This file contains bidirectional or hidden Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
""" Problem Statement (Digit Fifth Power ): https://projecteuler.net/problem=30
1
+
""" Problem Statement (Digit Fifth Powers): https://projecteuler.net/problem=30
2
2
3
3
Surprisingly there are only three numbers that can be written as the sum of fourth
4
4
powers of their digits:
@@ -13,26 +13,32 @@
13
13
Find the sum of all the numbers that can be written as the sum of fifth powers of their
14
14
digits.
15
15
16
-
(9^5)=59,049
17
-
59049*7=4,13,343 (which is only 6 digit number)
18
-
So, number greater than 9,99,999 are rejected
19
-
and also 59049*3=1,77,147 (which exceeds the criteria of number being 3 digit)
20
-
So, n>999
21
-
and hence a bound between (1000,1000000)
16
+
9^5 = 59049
17
+
59049 * 7 = 413343 (which is only 6 digit number)
18
+
So, numbers greater than 999999 are rejected
19
+
and also 59049 * 3 = 177147 (which exceeds the criteria of number being 3 digit)
0 commit comments