@@ -0,0 +1,1234 @@
+import java.util.*;%0Aimport java.io.*;%0Aimport java.math.*;%0A%0Aclass Solution %7B%0A%0A    public static void main(String args%5B%5D) %7B%0A        Scanner in = new Scanner(System.in);%0A        String msg = in.nextLine();%0A%0A%0A          StringBuilder binMsg = new StringBuilder(%22%22);%0A        %0A        /* Converts the message into its binary code, char by char %0A        (without forgetting 0s in the beginning like toBinaryString does)*/%0A        for (char c : msg.toCharArray()) %7B%0A            String binChar = Integer.toBinaryString(c);%0A            for (int j = binChar.length(); j %3C 7 ;j++)%0A                binMsg.append(%220%22);%0A            binMsg.append(binChar);%0A        %7D%0A  %0A        char prev = '2';%0A        int count = 0;%0A%0A        for (char c :  binMsg.toString().toCharArray()) %7B%0A            if (c != prev) %7B%0A                for (int j = 0 ; j %3C count ; j++) %0A                    System.out.print(%220%22);%0A                if (count != 0) %0A                    System.out.print(%22 %22);%0A                System.out.print((c == '0') ? %2200 %22 : %220 %22);%0A                count = 1;%0A            %7D else %7B%0A                count++;%0A            %7D%0A            prev = c;%0A        %7D%0A        for (int j = 0 ; j %3C count ; j++) %0A            System.out.print(%220%22);         %0A    %7D%0A%7D%0A

Create App.java