using System;
namespace Solution {
class Solution {
static void Main(string[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
float diferencia,promedio=0, X = 0;
double Y = 0, Z;
int N = Convert.ToInt32(Console.ReadLine());
string [] cadena = Console.ReadLine().Split(' ');
float [] enteros = new float[N];
for (int i=0; i<enteros.Length; i++) {
enteros[i] = Convert.ToInt32(cadena[i]);
X += enteros[i];
Y += Math.Pow(enteros[i],2);
//Y += enteros[i]*enteros[i];
promedio = X / N;
if (enteros[i] > promedio){
for(int i = 0 ; i < N ;i++)
Console.Write("{0} ",enteros[i]);
}
}
Z = X/(Math.Pow(Y,3));
for (int k=0; k < N;k++) {
for (int i=0; i < N-1; i++) {
if (enteros[i] > enteros[i+1]) {
float enteroAux = enteros[i];
enteros[i]=enteros[i+1];
enteros[i+1]=enteroAux;
}
}
}
diferencia = enteros[N-1] - enteros[0];
Console.WriteLine("\n"+ diferencia);
Console.WriteLine($"{ Z:F20}");
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: