#include int main(void) { // Initialize variables int n, temp; scanf("%d", &n); scanf("%d", &temp); int min = temp, max = temp, sum = 0; sum += temp; for (int i = 0; i < n - 1; i++) { scanf("%d", &temp); sum += temp; if (temp < min) { min = temp; } if (temp > max) { max = temp; } } printf("%d %d %d\n", sum, max, min); return 0; }