report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Pascal's triangle - MarisaOJ: Marisa Online Judge

Pascal's triangle

Time limit: 1000 ms
Memory limit: 256 MB
Print the [Pascal triangle](https://en.wikipedia.org/wiki/Pascal%27s_triangle) of size $n$. For example, Pascal triangle of size 5: ``` 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 ``` ### Input - A single integer $n$. ### Output - Print the Pascal triangle of size $n$. ### Constraints - $1 \le n \le 50$. ### Example Input: ``` 4 ``` Output: ``` 1 1 1 1 2 1 1 3 3 1 ```
Two dimensional array
Pascal's triangle
Column sum
Appearance
Diagonal sum
Point coverage
Swap operation
Spiral matrix
Word search
Matrix rotation
Matrix Zigzag
Topic
Basic
Rating 800
Solution (2) Solution