@@ -0,0 +1,1175 @@
+import java.util.Scanner;%0A%0Apublic class Main %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        int%5B%5D%5B%5D DIGITS = %7B%7B0, 1, 1, 1, 1, 1, 1%7D,%0A                          %7B0, 0, 0, 0, 1, 1, 0%7D,%0A                          %7B1, 0, 1, 1, 0, 1, 1%7D,%0A                          %7B1, 0, 0, 1, 1, 1, 1%7D,%0A                          %7B1, 1, 0, 0, 1, 1, 0%7D,%0A                          %7B1, 1, 0, 1, 1, 0, 1%7D,%0A                          %7B1, 1, 1, 1, 1, 0, 1%7D,%0A                          %7B0, 1, 0, 0, 1, 1, 1%7D,%0A                          %7B1, 1, 1, 1, 1, 1, 1%7D,%0A                          %7B1, 1, 0, 1, 1, 1, 1%7D%7D;%0A%0A        Scanner sc = new Scanner(System.in);%0A%0A        while (true) %7B%0A%0A            int n = sc.nextInt();%0A%0A            if (n == -1) %7B%0A                break;%0A            %7D%0A%0A            int%5B%5D current = %7B0, 0, 0, 0, 0, 0, 0%7D;%0A%0A            for (int i = 0; i %3C n; i++) %7B%0A%0A                int%5B%5D next = DIGITS%5Bsc.nextInt()%5D;%0A%0A                for (int segment = 0; segment %3C 7; segment++) %7B%0A%0A                    System.out.print(current%5Bsegment%5D == next%5Bsegment%5D ? 0 : 1);%0A%0A                %7D%0A                System.out.println();%0A%0A                current = next;%0A%0A            %7D%0A%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Create : 0228