题解 | #Zero-complexity #
Zero-complexity Transposition
https://www.nowcoder.com/practice/c54775799f634c72b447ef31eb36e975
#include <bits/stdc++.h>
#include <cstdio>
#include <stack>
using namespace std;
int main() {
int n;
cin>>n;
stack<int> myStack;
for(int i=0;i<n;i++){
int x;
cin>>x;
myStack.push(x);
}
while(!myStack.empty()){
printf("%d ",myStack.top());
myStack.pop();
}
}
// 64 位输出请用 printf("%lld")
查看8道真题和解析