@@ -0,0 +1,1551 @@
+import java.util.Scanner;%0A%0Apublic class Main %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        Scanner sc = new Scanner(System.in);%0A%0A        while (true) %7B%0A%0A            int h = sc.nextInt();%0A            int w = sc.nextInt();%0A%0A            if (h == 0 && w == 0) %7B%0A                break;%0A            %7D%0A%0A            boolean%5B%5D%5B%5D visited = new boolean%5Bh%5D%5Bw%5D;%0A%0A            char%5B%5D%5B%5D map = new char%5Bh%5D%5Bw%5D;%0A%0A            for (int i = 0; i %3C h; i++) %7B%0A                map%5Bi%5D = sc.next().toCharArray();%0A            %7D%0A%0A            int x = 0;%0A            int y = 0;%0A%0A            boolean isGoal = false;%0A            boolean isLoop = false;%0A%0A            while (!isGoal) %7B%0A%0A                if (visited%5By%5D%5Bx%5D) %7B%0A                    System.out.println(%22LOOP%22);%0A                    isLoop = true;%0A                    break;%0A                %7D%0A%0A                visited%5By%5D%5Bx%5D = true;%0A%0A                char tile = map%5By%5D%5Bx%5D;%0A%0A                switch (tile) %7B%0A%0A                    case '%3E' :%0A                        x++;%0A                        break;%0A                    case '%3C' :%0A                        x--;%0A                        break;%0A                    case '%5E' :%0A                        y--;%0A                        break;%0A                    case 'v' :%0A                        y++;%0A                        break;%0A                    case '.' :%0A                        isGoal = true;%0A                        break;%0A%0A                %7D%0A%0A            %7D%0A%0A            if (!isLoop) %7B%0A                System.out.println(x + %22 %22 +y);%0A            %7D%0A%0A        %7D%0A%0A    %7D%0A%0A%7D%0A

Create : 0104