解题思路:
注意事项:
参考代码:
import java.util.Scanner; public class T1 { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); int N=scanner.nextInt(); int M=scanner.nextInt(); int num[]=new int [N*M]; for (int i = 0; i < num.length; i++) { num[i]=scanner.nextInt(); } for (int i = 0; i < num.length; i++) { num[i]+=scanner.nextInt(); } for (int i = 0; i < num.length; i++) { System.out.print(num[i]+" "); if ((i+1)%M==0) { System.out.println(); } } } }
0.0分
1 人评分