#include<iostream>using namespace std;int main() { int arr[501] = {0}; int n, num; cin >> n; while (n--) { &...