You are viewing a single comment's thread. Return to all comments →
Python solution inspired by your idea.
s = '10001001100210031004100510061007' for n in range(1, len(s)+1): t = s[:n] l = [t] if t == s: print('NO') break while len(''.join(l)) < len(s): l.append(str(int(l[-1]) + 1)) if ''.join(l) == s: print('YES', l[0]) break
Seems like cookies are disabled on this browser, please enable them to open this website
Separate the Numbers
You are viewing a single comment's thread. Return to all comments →
Python solution inspired by your idea.