题解 | #Zero-complexity

Zero-complexity Transposition

https://www.nowcoder.com/practice/c54775799f634c72b447ef31eb36e975

#include <bits/stdc++.h>

using namespace std;

stack<long long> s;

int main(){
	int n;
	
	while(cin >> n){
		for(int i = 0;i < n;i ++){
			long long number;
			cin >> number;
			s.push(number);
		}
		while(!s.empty()){
			cout << s.top() << " ";
			s.pop();
		}
		
	}
	
	return 0;
}

全部评论

相关推荐

点赞 评论 收藏
分享
EEbond:给北邮✌️跪了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务