16 lines
301 B
C++
16 lines
301 B
C++
|
|
#include <bits/stdc++.h>
|
||
|
|
|
||
|
|
using namespace std;
|
||
|
|
typedef long long LL;
|
||
|
|
const int N = 30;
|
||
|
|
LL a[N];
|
||
|
|
|
||
|
|
int main() {
|
||
|
|
a[1] = 1;
|
||
|
|
a[2] = 2;
|
||
|
|
for (int i = 3; i < N; i++)
|
||
|
|
a[i] = a[i - 1] + a[i - 2];
|
||
|
|
for (int i = 1; i <= 20; i++)
|
||
|
|
printf("%lld ", a[i]);
|
||
|
|
return 0;
|
||
|
|
}
|