1 min read

APL Hacking: Project Euler (#30)

I figure it's about time I posted another Project Euler.

Problem #30:

    ∇Z←PETHIRTY;M
[1] ⍝ Find the sum of all the numbers that can be written as
[2] ⍝ the sum of fifth powers of their decimal digits.
[3] Z←+/1↓((⍳M)=+⌿(((1+⌊10⍟M)⍴10)⊤⍳M)*5)/⍳M←200000
    ∇