Swap The Characters by twobit

import java.util.*;enum L{L;System z;String a,q=" ";{for(Scanner s=new Scanner(z.in);(a=s.next())==a;z.out.println(a))for(String w:(s.nextLine()+q).split("")){a=a.replace(w,q);q=w;}}}

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

download

return to the top page