#include <iostream> using namespace std; int main(){int a;cin>>a;if(a)main(),cout<<a<<" ";}
这道题可以用巧妙的递归