using System; using System.Linq; using System.Collections.Generic; public class Program { public static void Main() { string input; while ((input = System.Console.ReadLine ()) != null) { // 注意 while 处理多个 case int x = Convert.ToInt32(input); int y = Convert.ToInt32(Console.ReadLine ()); int z = Convert.ToInt32(Console.ReadLine ()); var matrix1 = new int[x,y]; var matrix2 = new int[y,z]; for(int i = 0;i < x;i++) { var line = Console.ReadLine(); var split = line.Split(' '); for(int j = 0;j<y;j++) { matrix1[i,j] = Convert.ToInt32(split[j]); } } for(int i = 0;i < y;i++) { var line = Console.ReadLine(); var split = line.Split(' '); for(int j = 0;j<z;j++) { matrix2[i,j] = Convert.ToInt32(split[j]); } } //result for(int i =0;i<x;i++) { for(int j = 0;j<z;j++) { var sum = 0; for(int h = 0;h<y;h++) { sum += matrix1[i,h]*matrix2[h,j]; } Console.Write(sum+" "); } Console.WriteLine(); } }

}

}