Read Diagonally by war

class A{public static void main(String[] a)throws Exception{
for(int c,d=0,x=1,z=1;(c=System.in.read())>0;++x){d=x<2?c:d;if(c==10){x=0;c=d;z=z<1?~z:0;}if(x==z){System.out.print((char)c);z=z<1?2:~z-1;}}}}

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

download

return to the top page