Functional Programming

Project Euler – Problem 40 Solution

Problem An irrational decimal fraction is created by concatenating the positive integers: 0.123456789101112131415161718192021… It can be seen that the 12th digit of the fractional part is 1. If dn represents the nth digit of the fractional part, find the value of the following expression. d1 x d10 x d100 x d1000 x d10000 x d100000 …

Project Euler – Problem 40 Solution Read More »

Project Euler – Problem 36 Solution

Problem The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please note that the palindromic number, in either base, may not include leading zeros.) Solution The isPalindromic function here is an enhanced version …

Project Euler – Problem 36 Solution Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close