#include <iostream> using namespace std; void f(){ int a; if(cin>>a) f(); if(a != 0) cout<<a<<" "; } int main() { f(); } // 64 位输出请用 printf("%lld")