1 条题解

  • 0
    @ 2026-4-20 16:09:38
    #include<bits/stdc++.h>
    #include <stack>
    using namespace std;
    int main(){
    	stack<int> st;
    	int x;
    	while (cin>>x){
    		if(x==0) break;
    		st.push(x);
    	}
    	while(!st.empty()){
    		cout<<st.top()<<" ";
    		st.pop();
    	}
    	return 0;
    }
    

    信息

    ID
    2893
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    递交数
    134
    已通过
    44
    上传者