expand text by Hex

using c=System.Console;class P{static void Main(){int a=int.Parse(c.ReadLine());string b=c.ReadLine(),e="",f="";for(int d=0;d<b.Length;d++){for(int g=0;g<a;g++){e+=b.Substring(d,1);if(g==0|g==(a-1))f+=b.Substring(d,1);else f+=" ";}}for(int g=0;g<a;g++){if(g==0|g==(a-1))c.WriteLine(e);else c.WriteLine(f);}}}

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

download

return to the top page