Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Question by Ibrahim Mesecan.
Filling an Array 3
Question:
Write a program that fills an array diagonally starting from
upper-right corner.
Input specification:
You will be given two integers: number of rows (n)
and number of columns (m) for 2D array where 1 ≤
(n and m) ≤ 100.
Output specification:
Show 2D array.
Sample Input 1 |
Sample Input 2 |
3 4
|
5 4
|
Sample Output 1 |
Sample Output 2 |
7 4 2 1
10 8 5 3
12 11 9 6
|
7 4 2 1
11 8 5 3
15 12 9 6
18 16 13 10
20 19 17 14
|
Для отправки решений необходимо выполнить вход.
|