public static void main(String[] args)  {
        
        int[][]dp = new int[11][11];
        dp[1][1] = 1;
        for (int i = 1; i <= 10; i++) {
            for (int j = 1; j <= 10; j++) {
                System.out.print(field[i][j]);
                if(i == 1 && j == 1 || field[i][j] == '-') continue;
                dp[i][j] = dp[i-1][j] + dp[i][j-1];
            }
            System.out.println();
        }
        System.out.println("最短経路のパターンは" + dp[10][10] + "通り");

        for (int i = 1; i <= 10; i++) {
           for (int j = 1; j <= 10; j++) {
               System.out.printf("%1$ 6d", dp[i][j]);
           }
           System.out.println();
        }
    }