Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Auto-generated code below aims at helping you parse
- * the standard input according to the problem statement.
- **/
- const n = parseInt(readline());
- k=0
- for(i=n; i>= 1; i--)
- {
- l = '';
- if(k%2==0)
- for(j = 1; j <= i; j++)
- l += j
- else
- for(j = i; j >= 1; j--)
- l += j
- k++
- print(l)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement