Bars (1) P62467


Statement
 

pdf   zip

thehtml

Write a program that reads a natural number n, and prints 2n − 1 bars of asterisks, following the pattern that can be deduced from the examples.

Input

Input consists of a natural number n > 0.

Output

Print 2n − 1 lines, following the pattern that can be deduced from the examples.

Public test cases
  • Input

    1
    

    Output

    *
    
  • Input

    2
    

    Output

    *
    **
    *
    
  • Input

    3
    

    Output

    *
    **
    *
    ***
    *
    **
    *
    
  • Input

    4
    

    Output

    *
    **
    *
    ***
    *
    **
    *
    ****
    *
    **
    *
    ***
    *
    **
    *
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Salvador Roura
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    C C++ Java Python Rust