栈写全部RE了!!!
查看原帖
栈写全部RE了!!!
704634
poor_OIer楼主2022/8/22 20:20
#include<bits/stdc++.h>
using namespace std;
stack<int> s;
int main()
{
	int a;
	while(cin>>a)
	{
		if(a==0)
			break;
		s.push(a);
	}
	while(s.top()!=0)
	{
		cout<<s.top()<<' ';
		s.pop();
	}
	return 0;
} 
2022/8/22 20:20
加载中...