Dilahk's contest X65086


Statement
 

pdf   zip

html

Input

A positive integer N (greater than or equal to 1).

Output

You should write the numbers until Nth row in form of a triangle where each position is calculated as explained above.

Public test cases
  • Input

    1
    

    Output

    1
    
  • Input

    3
    

    Output

      1  
     1 1 
    1 2 1
    
  • Input

    6
    

    Output

         1     
        1 1    
       1 2 1   
      1 3 3 1  
     1 4 6 4 1 
    1 5 1 1 5 1
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Python