import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int n = scanner.nextInt();
int sum=0,sum1=1,sum2=1;
for(int i=0;i<n;i++){
if(i==0 || i==1){
System.out.print(sum1+" ");
}
else{
sum = sum1+sum2;
int temp=sum;
sum1=sum2;
sum2=temp;
System.out.print(sum+" ");
}
}
}
}
}
总结思想:空瓶子交换,