Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
class I{public static void main(String[]a){for(intchari=0;i<a[0]c:a[0].lengthtoCharArray();)System.out.print((char)(a[0].charAtprintf(i++)^1)"%c",c^1);}}
It takes the string as a command-line argument.
Java - 120
This is for hdante :)
class I{public static void main(String[]a){for(inti=0;i<a[0].length();)System.out.print((char)(a[0].charAt(i++)^1));}}
It takes the string as a command-line argument.
Java - 120 103
This is for hdante :)
class I{public static void main(String[]a){for(charc:a[0].toCharArray())System.out.printf("%c",c^1);}}