๋ฌธ์ ๋งํฌ : https://codeup.kr/problemsetsol.php?psid=23
*1093๋ฒ
#include <iostream>
using namespace std;
int main(){
int n,k;
cin>>n;
int array[23]={0,};
for(int i=0;i<n;i++){
cin>>k;
array[k-1] +=1;
}
for(int z=0;z<23;z++){
cout<<array[z]<<" ";
}
}
*1094๋ฒ
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n,k;
cin>> n;
int array[n];
for(int i=0;i<n;i++){
cin>>k;
array[i]=k;}
for(int j=n-1;j>=0;j--){
cout<<array[j]<<" ";
}
}
*1095๋ฒ
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n;
cin>>n;
int array[n];
for(int i=0;i<n;i++){
cin>>array[i];
}
cout << *min_element(array, array+n) << endl;
}