import statistics

import sys



data_sets = sys.stdin.read().split("\n")



for i in data_sets[1:-1:2]:

    data_set = [int(j) for j in i.split()]

    print((statistics.pstdev(data_set)))
while True:

    n = int(eval(input()))

    if n == 0:

        break

    else:

        data_set = [int(i) for i in input().split()]

        m = sum(data_set) / n

        v = 0

        for i in data_set:

            diff = i - m

            v += diff ** 2

        v /= n

        print((v ** 0.5))
import statistics
import sys

data_sets = sys.stdin.read().split("\n")
for i in data_sets[1:-1:2]:
    data_set = [int(j) for j in i.split()]
    print((statistics.pstdev(data_set)))

while True:
    n = int(eval(input()))
    if n == 0:
        break
    else:
        data_set = [int(i) for i in input().split()]
        m = sum(data_set) / n
        v = 0
        for i in data_set:
            diff = i - m
            v += diff**2
        v /= n
        print((v**0.5))

-import statistics -import sys - -data_sets = sys.stdin.read().split("\n") -for i in data_sets[1:-1:2]: -    data_set = [int(j) for j in i.split()] -    print((statistics.pstdev(data_set))) +while True: +    n = int(eval(input())) +    if n == 0: +        break +    else: +        data_set = [int(i) for i in input().split()] +        m = sum(data_set) / n +        v = 0 +        for i in data_set: +            diff = i - m +            v += diff**2 +        v /= n +        print((v**0.5))