#include <stdio.h> #include<math.h> void bu(int arr[], int sz) { int i = 0; for (i = 0; i < sz - 1; i++) { int j = 0, flag = 0; for (j = 0; j < sz - 1 - i; j++) { if (arr[j] < arr[j + 1]) { int tmp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = tmp; flag = 1; } } if (flag == 0) break; } } int main() { int arr[1000], n; scanf("%d", &n); int i = 0; for (i = 0; i < n; i++) { scanf("%d", &arr[i]); } bu(arr, n); for (i = 0; i < n; i++) { int tmp = sqrt(arr[i]); if (sqrt(arr[i]) - tmp != 0) { printf("%d", arr[i]); break; } } return 0; }