You are viewing a single comment's thread. Return to all comments →
a = s[0] for i in range(1, len(s)): if s[i] == '0': a += '0' else: dau=s[:i] break i = 2 while len(a) < len(s) and i <= len(s) // 2+1: j = int(a) + 1 while True: a += str(j) if len(a) > len(s): break if a == s: print("YES", int(dau)) return j += 1 if a == s: print("YES", int(dau)) return a = s[:i] dau=s[:i] i += 1 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 →