Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

1 of 3
Leaky Nun
  • 50.6k
  • 6
  • 115
  • 291

Python 3, 69 bytes

lambda n:sum(max(j for j in range(1,i)if i%j<1)for i in range(2,n+1))

Try it online!

Leaky Nun
  • 50.6k
  • 6
  • 115
  • 291

AltStyle によって変換されたページ (->オリジナル) /