题解 | #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;
}

全部评论

相关推荐

02-19 19:57
门头沟学院 Java
点赞 评论 收藏
分享
牛客765689665号:没有实习是硬伤,央国企看学历
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务