import java.io.*; /** * 主对角线元素行坐标等于列坐标,副对角线元素行坐标加列坐标等于阶数减一。 */ public class Main { public static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); public static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out)); public static StreamTokenizer cin = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in))); public static PrintWriter cout = new PrintWriter(new OutputStreamWriter(System.out)); public static void main(String[] args) throws Exception { int sum1 = 0, sum2 = 0; int temp; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { cin.nextToken(); temp = (int) cin.nval; if (i == j) { sum1 += temp; } if (i + j == 2) { sum2 += temp; } } } cout.printf("%d %d", sum1, sum2); cout.flush(); } }
0.0分
0 人评分