Snippet

project_euler/13.rb
Code:
# Project Euler Problem 13: Large Sum

# https://projecteuler.net/problem=13

# Work out the first ten digits of the sum of the given
# one-hundred 50-digit numbers.

require_relative './helpers.rb'

def solve(nums)
    nums.sum.to_s[0, 10]
end

nums = get_dataset(problem: 13).map(&:to_i)

puts solve(nums)
Output:
5537376230