那做了??????????

wc048 2025-03-02 18:49:27 2025-03-02 18:50:34 4

#include<bits/stdc++.h> using namespace std; int main() { long long int k,n1=0,n2=1,t; cin>>k; if(k==1) { cout<<0<<" "; } if(k==2) { cout<<0<<" "<<1<<" "; } else { cout<<0<<" "<<1<<" "; for(int i=3;i<=k;i++) { t=n1+n2; n1=n2; n2=t; cout<<t<<" "; } }

}

0