using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Baekjoon
{
class Program
{
static void Main(string[] args)
{
string[] s = Console.ReadLine().Split();
int n = int.Parse(s[0]);
int m = int.Parse(s[1]);
int[,] A = new int[n, m];
int[,] B = new int[n, m];
for (int i = 0; i < n; i++)
{
string[] line = Console.ReadLine().Split();
for (int j = 0; j < m; j++)
{
A[i, j] = int.Parse(line[j]);
}
}
for (int i = 0; i < n; i++)
{
string[] line = Console.ReadLine().Split();
for (int j = 0; j < m; j++)
{
B[i, j] = int.Parse(line[j]);
}
}
for (int i=0; i<n; i++)
{
for(int j=0; j<m; j++)
{
Console.Write(A[i, j] + B[i, j] + " ");
}
Console.WriteLine();
}
}
}
}
string[] s = new int[3]{"안녕", "Hello", "Halo"};
string[] s = new int[]{"안녕", "Hello", "Halo"};
string[] s = {"안녕", "Hello", "Halo"};
int[] scores = new int[5]
scores[^1] = 34;
System.Range r1 = 0..3;
int[] sliced = scores[r1]
int[,] array = new int[2,3];
Console.WriteLine( array[ 0, 2 ] );
int[,] arr = new int[2, 3] {{1, 2, 3}, {4, 5, 6}};
int[,] arr = new int[,] {{1, 2, 3}, {4, 5, 6}};
int[,] arr = {{1, 2, 3}, {4, 5, 6}};
int[, ,] array = new int[4, 3, 2]
{
{ {1, 2}, {3, 4}, {5, 6} },
{ {1, 4}, {2, 5}, {3, 6} },
{ {6, 5}, {4, 3}, {2, 1} },
{ {6, 3}, {5, 2}, {4, 1} },
};
for (int i = 0; i < array.GetLength(0); i++)
{
for (int j = 0; j < array.GetLength(1); j++)
{
Console.Write("{ ");
for (int k = 0; k < array.GetLength(2); k++)
{
Console.Write($"{array[i, j, k]} ");
}
Console.Write("} ");
}
Console.WriteLine();
}
int[][] jagged = new int[3][];
jagged[0] = new int[5] { 1, 2, 3, 4, 5 };
jagged[1] = new int[] { 10, 20, 30 };
jagged[2] = new int[] { 100, 200 };
int[][] jagged2 = new int[2][] {
new int[] { 1000, 2000 },
new int[4] { 6, 7, 8, 9 } };
감사합니다