题解 | #Zero-complexity Transposition#

Zero-complexity Transposition

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

#include<iostream>
#include<cstdio>
#include<stack>
using namespace std;
stack<long long> number;
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        long long num;
        for(int i=0;i<n;++i){
            scanf("%lld",&num);
            number.push(num);
        }
        while(!number.empty()){
            cout<<number.top()<<" ";
            number.pop();
        }
        cout<<endl;
    }
    return 0;
}

全部评论

相关推荐

点赞 评论 收藏
分享
醉蟀:你不干有的是人干
点赞 评论 收藏
分享
06-12 16:23
已编辑
小米_软件开发(准入职员工)
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务