HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50304 - Number Pattern

Guest
• Review clarifications (1)

Volume problems

• 140. 50599 - Sum of Squared Error ...
• 15-SprPrE1-80. 50741 - DNA Distance
• 155. 50334 - What is the class aver...
• 185. 50784 - Top Growing Company
• 220. 50754 - Team Standings
• 230. 50286 - Remove Duplicates
• 250. 50448 - Paint Buckets
• 280. 50477 - Character Pyramids
• 50304 - Number Pattern
• 50492 - Contest Scoreboard
• 50322 - Snake Pattern
• 50321 - Missing Number
• 50445 - Cryptography
• 50410 - Zero Padding
• 50380 - Sum of the Numbers in the ...
• 50400 - nth Row rth Element of a Table
• 50457 - The Number of Winners

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Geri Gokaj.

Number Pattern

Write a program to show the numbers from 1 to N*N in a table with N*N size.
The numbers will be displayed in ascending order starting from first column of the matrix. Then it will continue from the top of the next column.

Input specification
The number N. (1<=N<=50)

Output specification
The required pattern with N*N size. There will be space in between the numbers.

Sample Input I
3
Sample Input II
5
Sample Output I
1 4 7
2 5 8
3 6 9
Sample Output II
1 6 11 16 21
2 7 12 17 22
3 8 13 18 23
4 9 14 19 24
5 10 15 20 25


Для отправки решений необходимо выполнить вход.

www.contester.ru