Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
49366 | zouqinghua | 数组逆序重存放 | C++ | Accepted | 0 MS | 236 KB | 213 | 2024-07-07 16:26:15 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a[n]; int i=0; for(;i<n;i++) { cin>>a[i]; } int j=i-1; for(;j>=0;j--) { cout<<a[j]<<" "; } return 0; }