Submit solution
Points:
1.00 (partial)
Time limit:
1.0s
Memory limit:
256M
Input:
stdin
Output:
stdout
Problem source:
Problem type
Allowed languages
C, C#, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Cho mảng số nguyên A[] gồm N phần tử, hãy lật ngược mảng A[] và in ra kết quả
Đầu vào
Dòng đầu tiên là số nguyên dương N
Dòng thứ 2 gồm N số nguyên viết cách nhau một vài khoảng trắng
Giới hạn
1<=N<=1000
-10^3<=A[i]<=10^3
Đầu ra
In ra mảng sau khi đã đảo ngược các phần tử
Ví dụ :
Input 01
5
1 2 3 4 5
Output 01
5 4 3 2 1
Comments
include <bits/stdc++.h>
using namespace std;
int main() {
int n,a[10005],i; cin>>n; for(i=1;i<=n;i++) cin>>a[i]; for(i=n;i>=1;i--) cout<<a[i]<<" "; return 0; } strong text
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.