#include<cstdio>
#include<stack>
#include<stdlib.h>
using namespace std;
int main(){
stack<long long>myStack;
int n;
long long num;
scanf("%d",&n);
for(int i =0; i< n; ++i){
scanf("%lld",&num);//%lld读取long long类型的十进制数
myStack.push(num);
}
while(!myStack.empty()){
printf("%lld ",myStack.top());
myStack.pop();
}
printf("\n");
system("pause");
}

京公网安备 11010502036488号