반응형
https://www.hackerrank.com/challenges/arrays-introduction/problem
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int arrNum,arr[10000];
cin>>arrNum;
for(int i=0;i<arrNum;i++)
{
cin>>arr[i];
}
for(int i= arrNum-1;i>=0;i--) cout<<arr[i]<<" ";
cout<<endl;
return 0;
}
반응형
'C++' 카테고리의 다른 글
[HackerRank] StringStream - Easy (0) | 2019.10.14 |
---|---|
[HackerRank]Attribute Parser - Medium (0) | 2019.10.14 |
[HackerRank] Variable Sized Arrays - Easy (0) | 2019.10.13 |
[HackerRank] Pointer - Easy (0) | 2019.10.12 |
[HackeRank] 함수(Functions_easy) (0) | 2019.10.01 |
댓글