Project Euler 80 - Square Root Digital Expansion
Project Euler 80 - Square Root Digital Expansion
Official link: https://projecteuler.net/problem=80
Thought Process
Thought Process
I initially solved this problem using the Decimal Module which allows for arbitrary decimal precision but then looking at other people's solutions, I found this beautiful algorithm by Frazer Jarvis: Square roots by subtraction, it's very readable and simple to use. I then re-did my code. Both versions are included below!
Interactive Code
Interactive Code
Enter an integer (yourinput)
Code will output the total of all the digital sums (up till the 100th decimal place) of the first yourinput integers