#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[100];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = n - 1; i >= 0; i--) {
cout << a[i] << " ";
}
return 0;
}
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[100];
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
cout << sum;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[100];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int unique = 0;
for (int i = 0; i < n; i++) {
bool found = false;
for (int j = 0; j < i; j++) {
if (a[i] == a[j]) {
found = true;
break;
}
}
if (!found) {
unique++;
}
}
cout << unique;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[100];
int sum = 0;
int max = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
if (a[i] > max) {
max = a[i];
}
}
double average = (double)sum / n;
int maxStudents = 0;
int belowAverage = 0;
for (int i = 0; i < n; i++) {
if (a[i] == max) {
maxStudents++;
}
if (a[i] < average) {
belowAverage++;
}
}
cout << "Max: " << maxStudents << endl;
cout << "Below average: " << belowAverage;
return 0;
}
#include <iostream>
using namespace std;
int main() {
int a[10];
for (int i = 0; i < 10; i++) {
cin >> a[i];
}
int k;
cin >> k;
int removed[10];
for (int i = 0; i < k; i++) {
cin >> removed[i];
}
for (int i = 0; i < 10; i++) {
bool deleted = false;
for (int j = 0; j < k; j++) {
if (a[i] == removed[j]) {
deleted = true;
break;
}
}
if (!deleted) {
cout << a[i] << " ";
}
}
return 0;
}