import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int ai=sc.nextInt(); int aj=sc.nextInt(); BigInteger[][]a=new BigInteger[ai][aj]; for (int i = 0; i < ai; i++) { for (int j = 0; j < aj; j++) { a[i][j]=new BigInteger( sc.next()); } } int bi=sc.nextInt(); int bj=sc.nextInt(); BigInteger[][]b=new BigInteger[bi][bj]; for (int i = 0; i < bi; i++) { for (int j = 0; j < bj; j++) { b[i][j]=new BigInteger( sc.next()); } } for (int i = 0; i < ai; i++) { for (int j = 0; j < bj; j++) { BigInteger sum=new BigInteger("0"); for (int k = 0; k < aj; k++){ sum=sum.add(a[i][k].multiply(b[k][j])); } System.out.print(sum+" "); } System.out.println(); } } }
0.0分
1 人评分
WU-判定字符位置 (C++代码)浏览:1395 |
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)浏览:635 |
1157题解浏览:711 |
2006年春浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:661 |
C语言程序设计教程(第三版)课后习题12.1 (C语言代码)浏览:642 |
筛排处理 (C语言代码)浏览:782 |
简单的a+b (C语言代码)浏览:645 |
【亲和数】 (C语言代码)浏览:688 |
Manchester- 求之N内的素数浏览:1494 |
顺子浏览:1250 |