Given the numbers 1-10000 inclusive, can you replace all the 0s with a plus sign and calculate the total of all distinct numbers. A distinct number is just one that is separated by a plus sign. For instance 1011 => 1 + 11 = 12. 1010 => 1 + 1 = 2.
Given the numbers 1-10000 inclusive, can you replace all the 0s with a plus sign and calculate the total of all distinct numbers. A distinct number is just one that is separated by a plus sign. For instance 1011 => 1 + 11 = 12. 1010 => 1 + 1 = 2.
Permalink: http://problemotd.com/problem/zero-replaced/
Content curated by @MaxBurstein
Comments:
Akshay Bist - 9 years, 9 months ago
Python
reply permalink