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.
My personal blog – pretty much a journal of whatever I’m messing around with at the time.
Computer science, programming and hacking hardware.
© 2019 The Midlife Geek
Theme by Anders Noren — Up ↑