Function Task(A() As double, B() as double, C() as double) As integer
n%=Ubound(A,1)
m%=Ubound(B,1)
k%=Ubound(C,1)
s#=0
p#=1
For i%=1 to m%
s#=s#+B(i%)
next i%
s#=s#/m%
For i%=1 to k%
p#=p#*B(i%)
p#=p#^(1/k%)
if abs(p#-s#)<=1.0E-15 then
Task=0
Exit function
End if
if p# > s# then
t#=p#
p#=s#
s#=t#
End id
z%=0
for i%=1 to n%
if A(i%) >= p# And A(i%)<=s# then z%=z%+1
Next i%
task=z%
End Function
Function Task(A() As double, B() as double, C() as double) As integer
n%=Ubound(A,1)
m%=Ubound(B,1)
k%=Ubound(C,1)
s#=0
p#=1
For i%=1 to m%
s#=s#+B(i%)
next i%
s#=s#/m%
For i%=1 to k%
p#=p#*B(i%)
next i%
p#=p#^(1/k%)
if abs(p#-s#)<=1.0E-15 then
Task=0
Exit function
End if
if p# > s# then
t#=p#
p#=s#
s#=t#
End id
z%=0
for i%=1 to n%
if A(i%) >= p# And A(i%)<=s# then z%=z%+1
Next i%
task=z%
End Function