We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 880dc44 commit 25abd51Copy full SHA for 25abd51
armstrong_bw_100_1000.py
@@ -0,0 +1,11 @@
1
+def armstrong(n):
2
+ d = str(n)
3
+ l = len(d)
4
+ sum_of_cube = sum(int(d) ** l for d in d)
5
+ return sum_of_cube == n
6
+for n in range(100,1000):
7
+ if armstrong(n):
8
+ print(n)
9
+
10
11
0 commit comments