提交时间:2026-03-13 15:24:46
运行 ID: 85534
#include<bits/stdc++.h> using namespace std; int a[1000][1000],b[1000][1000]; int main(){ int n,m,k; cin>>n>>m>>k; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a[i][j]; } } for(int i=0;i<m;i++){ for(int j=0;j<k;j++){ cin>>b[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<k;j++){ int s=0; for(int x=0;x<=m-1;x++){ s+=a[i][x]*b[x][j]; } cout<<s<<" "; } cout<<endl; } return 0; }