j

tpx077  •  9个月前


include<bits/stdc++.h>

using namespace std;

int main() {

long long
 a=1,
  b=1,
   c=1,
    d=2,
   n,
  t;
 cin
>>n;
n-=4;
 cout
  <<a<<' '
   <<b<<' '
  <<c<<' '
 <<d<<' ';
for
(
 int i;
  i<n;
 i++
)
{
	t=a+b+c;
	 a=b;
	b=c;
	 c=d;
	d=t;
	cout<<t<<' ';
}


return 0;

}


评论: