--- tags: 解題報告,zj --- # f345. 新手練習題—陣列 題目連結: [Zerojudge](https://zerojudge.tw/ShowProblem?problemid=f345) ## 題目說明 將輸入的數列反轉輸出 ## 想法 先將輸入的數字存起來 在由後往前輸出 ## 參考解法 :::spoiler 點我展開 ```cpp= #include<bits/stdc++.h> using namespace std; const int MAXARR = 1e6; int arr[MAXARR]; signed main(){ int N; cin>>N; for (int i=0; i<N; i++) cin>>arr[i]; for (int i=N-1; i>=0; i--) cout<<arr[i]<<" "; return 0; } ``` ::: ---