fork download
  1. s ='1'*98
  2. while ("1111" in s ):
  3. s = s.replace("1111" , "22" , 1)
  4. s = s.replace("222" , "1" , 1)
  5.  
  6. print(s)
Success #stdin #stdout 0.04s 9576KB
stdin
Standard input is empty
stdout
12