I noticed that my car's odometer was at 101101 when I got to work today. Which is a cool number because it's binary (and a palindrome, but that's not important). Now, I want to know when the next time I'll have a binary odometer reading. I can't read the odometer while I'm driving, because that would be dangerous, so it'll have to be binary either when I get to work or get home.
There's really bad traffic on the way to and from my office, so I have to take a different route each day.
For the purposes of this challenge, a day is a round trip and starts with my commute to work.
You'll need to take the initial reading of the odometer and a 10 element sequence representing the amount of miles each way. This sequence should be repeated until you get to a binary odometer reading. You should then output the number of days it takes until we get to a binary reading.
Both the milage for the route and the odometer reading will be positive integers. The count of days will either be
x.5, so your output of the day count needs to support floating point for half days. If the day count is an integer, you don't need to output the
.0. The odometer will always eventually reach a binary state.
Any form of input/output is acceptable and standard loopholes are disallowed.
101101, [27, 27, 27, 27, 27, 27, 27, 27, 27, 27] == 165.0 1, [13, 25, 3, 4, 10, 8, 92, 3, 3, 100] == 22.5 2, [2, 3, 1, 2, 7, 6, 10, 92, 3, 7] == 2.0