euler/crystal/euler006.cr

10 lines
142 B
Crystal
Raw Normal View History

2018-02-25 03:32:39 +00:00
module Euler
module Problem006
extend self
def solution
(1..100).sum ** 2 - (1..100).map { |n| n * n }.sum
end
end
end