[Community Puzzle] Binary Sequence

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Flaaamort,validated by @Benoi,@Juanmv94 and @BetaCorn.
If you have any issues, feel free to ping them.

Continuing the discussion from [Community Puzzle] Binary Sequence:

Hello everyone:)
Does anyone has a hint on how to avoid (optimize the code) the “Process has timed out” error? For the last scenario a loop that creates the sequence reaches 2^14 - for more it throws an above error. How to create the string that will have indexes expected by the last test scenario?
Thanks for all ideas!

There is, of course, a trick.
Start with the decimal sequence 01234567891011121314 and so on, then see what’s similar to the binary sequence and what’s different.