@@ -0,0 +1,892 @@
+import java.util.Scanner;%0A%0A/**%0A * Created by kdonohue on 4/7/17.%0A */%0Apublic class TidyNumbers %7B%0A    public static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        int numCases = in.nextInt();%0A        for (int i = 1; i %3C= numCases; i++) %7B%0A            System.out.println(%22Case #%22 + i + %22: %22 + processCase(in));%0A        %7D%0A    %7D%0A%0A    private static String processCase(Scanner in) %7B%0A        int n = in.nextInt();%0A        int lastTidy = 1;%0A        for (int i = 0; i %3C= n; i++) %7B%0A            if (isTidy(i)) %7B%0A                lastTidy = i;%0A            %7D%0A        %7D%0A        return lastTidy + %22%22;%0A    %7D%0A%0A    private static boolean isTidy(int n) %7B%0A        char%5B%5D chars = (n + %22%22).toCharArray();%0A        for (int i = 0; i + 1 %3C chars.length; i++) %7B%0A            if (chars%5Bi%5D %3E chars%5Bi+1%5D) %7B%0A                return  false;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Tidy numbers simple