String Halving by George2k

using c=System.Console;class g{static void Main(){string s = c.ReadLine();c.Write("{"+f(s)+"}");}static string f(string i){int s=i.Length;int r=s/2;int l=s-r;if(s==1){return i;}return "{"+f(i.Substring(0,l))+"}{"+f(i.Substring(l,r))+"}";}}

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

download

return to the top page