Home » Sum a list of 50 digit numbers
Problem 13 is summing a list of fifty digit numbers. I used the gmp library and R to solve in 2 lines:
print(substring((sum(as.bigz(readLines("euler13.txt")))), 0, 10))
Not much more to say really. I forgot the problem asks for the first 10 digits, so my first answer was wrong.
Your email address will not be published.
© 2018 The Midlife Geek
Theme by Anders Noren — Up ↑