문제

Given the deep diagonals of Pascal's triangle:

          1
        1   1
      1   2   1
    1   3   3   1
  1   4   6   4    1
1   5   10  10   5   1

1st diagonal: 1 1 1 1 1 ...
2nd diagonal: 1 2 3 4 5 ...
3rd diagonal: 1 3 6 10 15 ...
4th diagonal: 1 4 10 20 35 ...

Is there an algorithm to compute the first k terms from any ith diagonal?

도움이 되었습니까?

해결책

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top