题解 | #Zero-complexity#
Zero-complexity Transposition
https://www.nowcoder.com/practice/c54775799f634c72b447ef31eb36e975
#include <bits/stdc++.h> using namespace std; stack<long long> zhan; int main() { int n = 0; while (scanf("%d", &n) != EOF) { for (int i = 0; i < n; i++) { long long int number = 0; scanf("%lld", &number); zhan.push(number); } for (int i = 0; i < n; i++) { cout << zhan.top() << " " ; zhan.pop(); } printf("\n"); } return 0; }