Guest User

Untitled

a guest
Jul 5th, 2019
1,985
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n = int(input())
  2. s = input()
  3. bal = 0
  4. for c in s:
  5. if c == '0':
  6. bal += 1
  7. else:
  8. bal -= 1
  9. if bal != 0:
  10. print('1' + '\n' + s)
  11. else:
  12. print('2' + "\n" + s[0:-1] + " " + s[-1])
RAW Paste Data