fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. const int N = 35;
  6. unsigned long long t[N+2] = {0,1};
  7.  
  8. for(int i = 1; i<=N; i++)
  9. {
  10. for(int j = i; j>1; j--) t[j] = t[j] + t[j-1];
  11.  
  12. t[i+1] = t[i];
  13.  
  14. for(int j = i+1; j>1; j--) t[j] = t[j] + t[j-1];
  15.  
  16. cout << t[i+1] - t[i] << "\n";
  17. }
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1
2
5
14
42
132
429
1430
4862
16796
58786
208012
742900
2674440
9694845
35357670
129644790
477638700
1767263190
6564120420
24466267020
91482563640
343059613650
1289904147324
4861946401452
18367353072152
69533550916004
263747951750360
1002242216651368
3814986502092304
14544636039226909
55534064877048198
212336130412243110
812944042149730764
3116285494907301262