Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

ELGNAIRT - Printing triangle

Given integer n print such a triangle:

.
.
.
7
4 8 n-1
2 5 9 n
1 3 6 10 ...

Input

In the first and the only line there is an integer n (n<1001).

Output

As above.

Example

Input:
17
Output:
16
11 17
7 12
4 8 13
2 5 9 14
1 3 6 10 15


Added by:Piotr Kąkol
Date:2010-05-08
Time limit:10s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS OBJC SCM qobi VB.NET
Resource:Copy of Rafał Nowak's task CANTOR with different scoring

hide comments
2010-12-10 19:17:07 Piotr KÄ…kol
I know, they won't if I rejudge them, but I'll wait for fixing this command so that You won't have to submit these programs again. ;-)
2010-12-09 12:05:55 HWK
Oh, thank you! This is interesting because there are working solutions using the problematic command.
2010-12-08 18:40:24 Piotr KÄ…kol
That's the reason.
2010-12-07 19:08:31 HWK
Why my Bash-solutions 4404266, 4404274 and 4404364 resulted with NZEC? At home on Ubuntu 10.04 it runs without errors for input from 1 to 1000.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.