I am trying to do a programming problem in python,
they give two numbers and you need to count how many numbers inbetween the two given have 6 or 8 in them.
My solution is to loop over each of the numbers and convert the number to a string, then check if they have 6 or eight exclusively.
It works for small numbers but not for the 52bit number they give:
92871036442 and 3363728910382456
I will post my code below that can be dropped into a notebook python 3
any ideas would be nice
https://www.codepile.net/pile/b361jnMl
they give two numbers and you need to count how many numbers inbetween the two given have 6 or 8 in them.
My solution is to loop over each of the numbers and convert the number to a string, then check if they have 6 or eight exclusively.
It works for small numbers but not for the 52bit number they give:
92871036442 and 3363728910382456
I will post my code below that can be dropped into a notebook python 3
any ideas would be nice
https://www.codepile.net/pile/b361jnMl
