#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float max(float, float);
float min(float, float);
int /*<<< orphan*/ printf(char *, float, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n = 0;
  float l[100010];
  scanf("%d", &n);
  for (int i = 0; i < n; ++i)
    scanf("%f", &l[i]);
  float mini = 30.f, maxi = -1.f, mean = 0.f;
  for (int i = 0; i < n; ++i) {
    mini = min(mini, l[i]);
    maxi = max(maxi, l[i]);
    mean += l[i];
  }
  mean = mean / (1.f * n);
  printf("min=%f max=%f mean=%f n=%d\n", mini, maxi, mean, n);
  printf("%.2f\n", (20.f - (maxi - mini)) * mean * mean * 0.01f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x61ad0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb4(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
movl   $0x0,-0x61ab4(%rbp)
mov    -0x61ab4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11bb <main+0x7b>
movslq -0x61ab4(%rbp),%rax
lea    -0x61ab0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x61ab4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x61ab4(%rbp)
jmp    1175 <main+0x35>
movss  0xe41(%rip),%xmm0
movss  %xmm0,-0x61ab8(%rbp)
ff
movss  0xe2d(%rip),%xmm0
movss  %xmm0,-0x61abc(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x61ac0(%rbp)
ff
movl   $0x0,-0x61ac4(%rbp)
mov    -0x61ac4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    127d <main+0x13d>
movss  -0x61ab8(%rbp),%xmm0
ff
movslq -0x61ac4(%rbp),%rax
movss  -0x61ab0(%rbp,%rax,4),%xmm1
f9 ff
call   1040 <min@plt>
movss  %xmm0,-0x61ab8(%rbp)
ff
movss  -0x61abc(%rbp),%xmm0
ff
movslq -0x61ac4(%rbp),%rax
movss  -0x61ab0(%rbp,%rax,4),%xmm1
f9 ff
call   1050 <max@plt>
movss  %xmm0,-0x61abc(%rbp)
ff
movslq -0x61ac4(%rbp),%rax
movss  -0x61ab0(%rbp,%rax,4),%xmm0
f9 ff
addss  -0x61ac0(%rbp),%xmm0
ff
movss  %xmm0,-0x61ac0(%rbp)
ff
mov    -0x61ac4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x61ac4(%rbp)
jmp    11f0 <main+0xb0>
movss  -0x61ac0(%rbp),%xmm0
ff
cvtsi2ssl -0x8(%rbp),%xmm2
movss  0xd7e(%rip),%xmm1
mulss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x61ac0(%rbp)
ff
movss  -0x61ab8(%rbp),%xmm0
ff
movss  -0x61abc(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x61ac0(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
mov    -0x8(%rbp),%esi
lea    0xd4e(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x61abc(%rbp),%xmm1
ff
subss  -0x61ab8(%rbp),%xmm1
ff
movss  0xd21(%rip),%xmm0
subss  %xmm1,%xmm0
mulss  -0x61ac0(%rbp),%xmm0
ff
mulss  -0x61ac0(%rbp),%xmm0
ff
movss  0xd01(%rip),%xmm1
mulss  %xmm1,%xmm0
lea    0xd24(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x61ad0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x61ac0,%rsp
movl   $0x0,(%rsp)
lea    0xeb6(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    (%rsp),%esi
xorps  %xmm1,%xmm1
movss  0xe8e(%rip),%xmm0
movss  0xe8a(%rip),%xmm3
test   %esi,%esi
jle    1230 <main+0xf0>
lea    0x10(%rsp),%r15
lea    0xe85(%rip),%r14
xor    %ebx,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
add    $0x1,%rbx
movslq (%rsp),%rsi
add    $0x4,%r15
cmp    %rsi,%rbx
jl     1190 <main+0x50>
test   %esi,%esi
movss  0xe4c(%rip),%xmm3
xorps  %xmm1,%xmm1
movss  0xe3d(%rip),%xmm0
jle    1230 <main+0xf0>
movss  0xe37(%rip),%xmm3
movss  0xe2b(%rip),%xmm0
xorps  %xmm1,%xmm1
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movss  %xmm0,0x8(%rsp)
movss  %xmm1,0xc(%rsp)
movss  0x10(%rsp,%rbx,4),%xmm1
movaps %xmm3,%xmm0
call   1040 <min@plt>
movss  %xmm0,0x4(%rsp)
movss  0x10(%rsp,%rbx,4),%xmm1
movss  0x8(%rsp),%xmm0
call   1050 <max@plt>
movss  0xc(%rsp),%xmm1
movss  0x4(%rsp),%xmm3
addss  0x10(%rsp,%rbx,4),%xmm1
add    $0x1,%rbx
movslq (%rsp),%rsi
cmp    %rsi,%rbx
jl     11e0 <main+0xa0>
movss  %xmm3,0x4(%rsp)
movss  %xmm0,0x8(%rsp)
cvtsi2ss %esi,%xmm2
divss  %xmm2,%xmm1
movaps %xmm1,%xmm2
movss  %xmm1,0xc(%rsp)
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
cvtss2sd %xmm2,%xmm2
lea    0xdb7(%rip),%rdi
movaps %xmm3,%xmm0
mov    $0x3,%al
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm1
subss  0x8(%rsp),%xmm1
addss  0xd8b(%rip),%xmm1
movss  0xc(%rsp),%xmm0
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  0xd79(%rip),%xmm1
movaps %xmm1,%xmm0
lea    0xd95(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x61ac0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"min=%f max=%f mean=%f n=%d\0A\00"
@.str.3 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100010 x float]
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %4
br label %10
10: ; preds = %19, %0
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %22
14: ; preds = %10
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100010 x float], [100010 x float]* %3, i64 0, i64 %16
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %17)
br label %19
19: ; preds = %14
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %10
22: ; preds = %10
store float 3.000000e+01, float* %5
store float -1.000000e+00, float* %6
store float 0.000000e+00, float* %7
store i32 0, i32* %8
br label %23
23: ; preds = %46, %22
%24 = load i32, i32* %8
%25 = load i32, i32* %2
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %49
27: ; preds = %23
%28 = load float, float* %5
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [100010 x float], [100010 x float]* %3, i64 0, i64 %30
%32 = load float, float* %31
%33 = call float @min(float %28, float %32)
store float %33, float* %5
%34 = load float, float* %6
%35 = load i32, i32* %8
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [100010 x float], [100010 x float]* %3, i64 0, i64 %36
%38 = load float, float* %37
%39 = call float @max(float %34, float %38)
store float %39, float* %6
%40 = load i32, i32* %8
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [100010 x float], [100010 x float]* %3, i64 0, i64 %41
%43 = load float, float* %42
%44 = load float, float* %7
%45 = fadd float %44, %43
store float %45, float* %7
br label %46
46: ; preds = %27
%47 = load i32, i32* %8
%48 = add nsw i32 %47, 1
store i32 %48, i32* %8
br label %23
49: ; preds = %23
%50 = load float, float* %7
%51 = load i32, i32* %2
%52 = sitofp i32 %51 to float
%53 = fmul float 1.000000e+00, %52
%54 = fdiv float %50, %53
store float %54, float* %7
%55 = load float, float* %5
%56 = load float, float* %6
%57 = fpext float %56 to double
%58 = load float, float* %7
%59 = fpext float %58 to double
%60 = load i32, i32* %2
%61 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), float %55, double %57, double %59, i32 %60)
%62 = load float, float* %6
%63 = load float, float* %5
%64 = fsub float %62, %63
%65 = fsub float 2.000000e+01, %64
%66 = load float, float* %7
%67 = fmul float %65, %66
%68 = load float, float* %7
%69 = fmul float %67, %68
%70 = fmul float %69, 0x3F847AE140000000
%71 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), float %70)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"min=%f max=%f mean=%f n=%d\0A\00"
@.str.3 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100010 x float]
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast [100010 x float]* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %10, label %18
8: ; preds = %10
%9 = icmp sgt i32 %15, 0
br i1 %9, label %34, label %18
10: ; preds = %0, %10
%11 = phi i64 [ %14, %10 ], [ 0, %0 ]
%12 = getelementptr inbounds [100010 x float], [100010 x float]* %2, i64 0, i64 %11
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %12)
%14 = add nuw nsw i64 %11, 1
%15 = load i32, i32* %1
%16 = sext i32 %15 to i64
%17 = icmp slt i64 %14, %16
br i1 %17, label %10, label %8
18: ; preds = %34, %0, %8
%19 = phi float [ 3.000000e+01, %8 ], [ 3.000000e+01, %0 ], [ %41, %34 ]
%20 = phi float [ -1.000000e+00, %8 ], [ -1.000000e+00, %0 ], [ %43, %34 ]
%21 = phi float [ 0.000000e+00, %8 ], [ 0.000000e+00, %0 ], [ %45, %34 ]
%22 = phi i32 [ %15, %8 ], [ %6, %0 ], [ %47, %34 ]
%23 = sitofp i32 %22 to float
%24 = fdiv float %21, %23
%25 = fpext float %20 to double
%26 = fpext float %24 to double
%27 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), float %19, double %25, double %26, i32 %22)
%28 = fsub float %19, %20
%29 = fadd float %28, 2.000000e+01
%30 = fmul float %29, %24
%31 = fmul float %24, %30
%32 = fmul float %31, 0x3F847AE140000000
%33 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), float %32)
ret i32 0
34: ; preds = %8, %34
%35 = phi i64 [ %46, %34 ], [ 0, %8 ]
%36 = phi float [ %45, %34 ], [ 0.000000e+00, %8 ]
%37 = phi float [ %43, %34 ], [ -1.000000e+00, %8 ]
%38 = phi float [ %41, %34 ], [ 3.000000e+01, %8 ]
%39 = getelementptr inbounds [100010 x float], [100010 x float]* %2, i64 0, i64 %35
%40 = load float, float* %39
%41 = call float @min(float %38, float %40)
%42 = load float, float* %39
%43 = call float @max(float %37, float %42)
%44 = load float, float* %39
%45 = fadd float %36, %44
%46 = add nuw nsw i64 %35, 1
%47 = load i32, i32* %1
%48 = sext i32 %47 to i64
%49 = icmp slt i64 %46, %48
br i1 %49, label %34, label %18
}