Wonderful Multisets by test

using System;
using System.Text.RegularExpressions;
class X{static void Main(){for(;;){var l=Console.ReadLine();while(l[0]>'1'){var s=Regex.Match(l,@"{\d+}").Value;l=l.Replace(s,s.Length+2<2*s.Replace("1","").Length?"0":"1");}Console.WriteLine(l);}}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page