15分钟完成
#include<iostream>
using namespace std;
int main()
{
//freopen("xxx.in","r",stdin);
//freopen("yyy.out","w",stdout);
int n,a=0,b=1,c=a+b;
cin >> n;
for(int i=0;i<n;i++)
{
cout << a << " ";
a=b;
b=c;
c=a+b;
}
//fclose(stdin);
//fclose(stdout);
return 0;
}
很正常的新手膨胀期