You are viewing a single comment's thread. Return to all comments →
My python sollution :
def separateNumbers(s): for i in range(len(s)//2): n = s[:(i+1)] l = 0 while l < len(s): t = str(int(n)+1) if s.find(t,l) != -1 : if s.find(n,l) + len(n) != s.find(t,l) : break else : l += len(n) n = t else: l += len(n) break if l == len(s): print(f'YES {s[:(i+1)]}') return else : print('NO')
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 →
My python sollution :