#借用栈的思想,但要注意题目要求用long long类型,不过这道题用int也能对
#include "stdio.h"
#include "stack"
usingnamespacestd;
intmain(){
intn;longlongtemp;
stack<longlong> myStack;
while (scanf("%d",&n)!=EOF){
for (inti = 0; i < n; ++i) {
scanf("%lld",&temp);
myStack.push(temp);
}
while (!myStack.empty()){
printf("%lld ",myStack.top());
myStack.pop();
}
}
}