Problem:
Standard Deviation You have final scores of an examination for n students. Calculate standard deviation of the scores s 1 , s 2 ... s n . The variance α 2 is defined by α 2 = (∑ n i =1 (s i - m) 2 )/n where m is an average of s i .

  The standard deviation of the scores is the square root of their variance. Input The input consists of multiple datasets. Each dataset is given in the following format:  n  s 1  s 2 ... s n  The input ends with single zero for n . Output For each dataset, print the standard deviation in a line. The output should not contain an absolute error greater than 10 -4 . Constraints  n ≤ 1000  0 ≤ s i ≤ 100  Sample Input 5
70 80 100 90 20
3
80 80 80
0 Sample Output 27.85677655
0.00000000

Solution (Python):
import math

students = []
data = []
ans = []
while True:
  n = int(input())
  if n == 0:
    break
  students.append(n)
  data.append(list(map(int,input().split())))
for student, result in zip(students, data):
  total = 0
  for i in result:
    total += i
  average = total / student
  S = 0
  for j in result:
    S += (j - average) ** 2
  dispersion = S / student
  ans.append(math.sqrt(dispersion))
for out in ans:
  print(out)

Solution (Python):
import math
while True:
	n=int(input())
	if n==0:
		break
	table=list(map(int,input().split()))
	ave=sum(table)/n
	bun=0
	for i in range(n):
		s=(table[i]-ave)**2
		bun+=s
	print(math.sqrt(bun/n))

Solution (Python):
while 1:
    n = int(input())
    s = 0
    t = 0
    if n == 0:
        break
    a = list(map(float,input().split()))
    s += sum(a)
    h = float(sum(a)/int(n))
    for i in range(n):
        t += float(((a[i] - h)**2)/float(n))
    st = t**0.5
    print(st)

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break

    s = list(map(int, input().split()))
    m = sum(s) / n
    x = 0
    for i in range(n):
        x += (s[i] - m) ** 2
    print("{:f}".format(math.sqrt(x / n)))

Solution (Python):
import math
while True:
    s = []
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    m = sum(s) / n
    v2 = 0
    for i in range(n):
        v2 += (s[i]-m)**2
    v2 = v2/n
    print(math.sqrt(v2))

Solution (Python):
import math
while True:
    num=int(input())
    if num==0:
        break
    lst=list(map(int,input().split()))
    m=sum(lst)/len(lst)
    var=[(i-m)**2 for i in lst]
    n_var=sum(var)/len(lst)
    print(round(math.sqrt(n_var),8))

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    m = sum(s) / n
    a = 0
    for i in s:
        a += (i - m) ** 2
    print((a / n) ** 0.5)

Solution (Python):
import math
n = int(input())
while n != 0:
    s = list(map(float, input().split()))
    ave = sum(s) / n
    aa = 0.0
    for i in range(n):
        aa += (s[i] - ave)**2
    aa = math.sqrt(aa / n)
    print("{:10f}".format(aa))
    n = int(input())

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        exit()
    s = list(map(int,input().split()))
    m = sum(s) / n
    aa = 0
    for si in s:
        aa += (si - m) ** 2
    print(format((aa / n)**0.5,"0.5f"))

Solution (Python):
import math
from statistics import mean

while True:

    n = int(input())

    if n == 0:
        break
    
    scores = [float(x) for x in input().split()]
    m = mean(scores)
    
    a = 0
    a2 = 0
    for i in range(len(scores)):
        a2 += (scores[i] - m) ** 2 / len(scores)
    
    a = math.sqrt(a2)
    
    print(a)

Solution (Python):
n = []
s = []
while True:
    a = int(input())
    if a == 0:
        break
    else:
        n.append(a)
        s.append(list(map(int, input().split())))
for i in range(len(n)):
    m = sum(s[i]) / n[i]
    dis = 0
    for j in range(n[i]):
        dis += (s[i][j] - m) ** 2 / n[i]
    dis = dis ** 0.5
    print(dis)

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    m = sum(s) / len(s)

    num = 0.0
    for i in range(n):
        num += (s[i] - m) ** 2
    variance = num / n
    deviation = math.sqrt(variance)
    print(deviation)

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break;
    s = list(map(int, input().split()))
    sum = 0

    for i in range(n):
        sum += s[i]
    average = sum / n

    sum = 0
    for i in range(n):
        sum += (s[i] - average) ** 2
    print('{:.10f}'.format(math.sqrt(sum / n)))

Solution (Python):
while 1:
    sm2 = 0
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    m = sum(s)/n
    for x in s:
        sm2 += (x-m)**2
    print((sm2/n)**0.5)

Solution (Python):
ans = list()
while 1 :
	n = int(input())
	if n == 0: break
	s = list(map(int, input().split()))
	avg = sum(s)/n
	tmp = 0
	for i in s: tmp += (i-avg)**2
	ans += [(tmp/n)**(1/2)]

for i in ans: print(i)

Solution (Python):
import math
while True:
  n = int(input())
  if n ==0:
    break
  else:
    a=[]
    s = list(map(int,input().split()))
    mean = sum(s)/n
    for i in s:
      a.append("{0:.8f}".format(((i-mean)**2)/n))
    print(("{0:.8f}".format(math.sqrt(sum([float(i) for i in a])))))

Solution (Python):
import sys
import itertools
import math



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

while 1:
    N = int(readline())
    if N == 0:
        break
    A = [int(x) for x in readline().split()]
    m = sum(A)/N
    ans = 0
    for i in A:
        ans += (i - m) ** 2
    print((ans/N)**.5)

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0:
        break
    values = list(map(lambda x: float(x), input().split()))
    mean = sum(values) / len(values)
    print(math.sqrt(sum(list(map(lambda x: (x - mean) ** 2, values))) / len(values)))

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break

    s = list(map(int, input().split()))

    sum_s = sum(s)
    avg_s = (float)(sum_s / n)
    div = 0
    for v in s:
        div += (v - avg_s) ** 2 / n
    print("{:.10f}".format(div ** 0.5))

Solution (Python):
import math
while True :
    n = int(input())
    if n == 0 :
        break
    data = list(map(int, input().split()))
    mean = sum(data) / n
    variance = 0
    stdev = 0
    for d in data :
        variance += (d - mean) ** 2
    variance = variance / n
    stdev = math.sqrt(variance)
    print(stdev)

Solution (Python):
import sys
import math
import decimal

args = []
for l in sys.stdin:
    args.append(l)
lines = []
cnt = 0

while cnt < int(len(args)) - 1:
    num = int(args[cnt])
    cnt += 1
    if(num == 0):
        continue
    data = args[cnt].split(' ')
    cnt += 1

    numLine = []
    for points in data:
        numLine.append(int(points))

    average = 0.0
    for points in numLine:
        average += int(points)
    average /= num
    
    distributed = []
    for points in numLine:
        distributed.append((points - average) * (points - average))
    
    std_dev = 0.0
    for value in distributed:
        std_dev += value
    
    lines.append(math.sqrt(std_dev / num))

for line in lines:
    result = decimal.Decimal(line).quantize(decimal.Decimal("0.00000000"))
    if(decimal.Decimal(0E-8) == result):
        print("0.00000000")
    else:
        print(result)

Solution (Python):
while True:
    n = int(input())
    if n == 0: break
    s = list(map(int, input().split()))
    a = 0
    for i in range(n):
        a += s[i]
    a /= n
    e = 0
    for i in range(n):
        e += (s[i] - a)**2
    e = (e / n)**0.5
    print(e)

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    scores = list(map(int, input().split()))
    m = sum(scores) / n
    dev = list((i - m) for i in scores)
    var = sum((i ** 2) for i in dev) / n
    stdev = var ** 0.5
    print(stdev)

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break
    score = list(map(int, input().split()))
    ave = 0
    sum = 0
    for i in range(n):
        ave += score[i]
        sum += score[i]**2
    ave /= n
    sum = (sum - n*ave**2) / n
    print("%f" %(math.sqrt(sum)))

Solution (Python):
import math
ans = []
while True:
    n = int(input())
    if n == 0:
        break
    sn = list(map(float,input().split()))
    avg = sum(sn) / len(sn)
    var = 0
    for i in sn:
        var += (i - avg)**2
    var /= n
    ans.append(math.sqrt(var))

for i in ans:
    print(i)

Solution (Python):
while True:
    n=input()
    if n==0:
        break
    s=map(float,raw_input().split())
    m=sum(s)/len(s)
    bunsan=0
    for i in range(n):
        bunsan+=(s[i]-m)**2
    bunsan=bunsan/n
    hensa=bunsan**(0.5)
    print hensa

Solution (Python):

import math

while True:
    n = int(input())

    if n == 0:
        break
    
    s = [int(x) for x in input().split()]

    total = 0
    
    for i in s:
        total += i

    m = total / n
    
    d = 0
    
    for i in s:
        d += (i - m) ** 2

    print((d / n) ** (1 / 2))

Solution (Python):
import statistics,math

while True:
    N = int(input())
    if N == 0:
        break
    s = list(map(int,input().split()))
    
    pstdev = statistics.pstdev(s)
    print(pstdev)

Solution (Python):
n = int(input())

while n != 0:
    *s, = map(int, input().split())
    m = sum(s)/n
    a = 0
    for i in range(n):
        a += ((s[i]-m)**2)/n

    print("{:.8f}".format(a**0.5))
    n = int(input())

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    else:
        sl = list(map(int, input().split()))
        m = sum(sl) / n
        v = 0
        for s in sl:
            v += (s - m)**2
        print((v/n)**0.5)

Solution (Python):
import  math
while(True):
    n=int(input())
    if n==0:
        exit()
    s=list(map(int,input().split()))

    ave=sum(s)/n
    v=0
    for i in range(n):
       v+=(s[i]-ave)**2

    v/=n
    print(math.sqrt(v))

Solution (Python):
import math

while True:
    n = int(input())
    if n==0: break
    
    a = list(map(int, input().split()))
    
    mean = sum(a)/len(a)
    
    v = 0
    for i in a:
        v += (i - mean)**2
    
    v /= len(a)
    sd = math.sqrt(v)
    
    print('%.5f'%sd)

Solution (Python):
import math

def ave(A,n):
    sum=0
    for i in range(n):
        sum+=A[i]
    return (sum/n)

def stdev(A,ave,n):
    sum=0
    for i in range(n):
        sum+=(A[i]-ave)**2
    return ((sum/n)**0.5)

n=int(input())
while n!=0:
    A=list(map(float,input().split()))
    Ave=ave(A,n)
    print(stdev(A,Ave,n))
    n=int(input())

Solution (Python):
import statistics

answer = []

while True:
    n = int(input())
    if n == 0:
        break

    s = list(map(int, input().split()))
    answer.append(statistics.pstdev(s))

[print("{:.8f}".format(answer[i])) for i in range(len(answer))]

Solution (Python):
import math
while True:
 n = int(input())
 if n==0:
  break
 S = list(map(int, input().split() ))
 m = sum(S)/n
 S2 = S
 for si in range(n):
  S2[si] = (S[si]-m)**2
 SS = sum(S2)/n
 sd = math.sqrt(SS)
 print(sd)

Solution (Python):
while int(input()):
 s=list(map(int,input().split()))
 n=len(s)
 a=sum(s)/n
 print((sum(x*x for x in s)/n-a*a)**.5)

Solution (Python):

import statistics

while True:
    x = int(input())
    if x == 0:
        break
    else:
        xlist = input().split()
        xlist = [int(s) for s in xlist]
        print(statistics.pstdev(xlist))

Solution (Python):
import statistics as st
olist = []
while True:
    n = int(input())
    if n == 0:
        break
    lst = []
    lst = input().split()
    if n == 1:
        olist.append(0)
    else:
        lst = [int(s) for s in lst]
        olist.append(st.pstdev(lst))
for s in olist:
    print("{:.8f}".format(s))

Solution (Python):
while True:
  n = int(input())
  if n == 0: break
  s = [int(i) for i in input().split()]
  ave = sum(s) / n
  sd = (sum([(i - ave) ** 2 for i in s]) / n) ** (1 / 2)
  print(sd)

Solution (Python):

import math
standard_deviation = list()

while True:
    student_number = int(input())
    if student_number == 0:
        break
    score_data = list(map(float, input().split()))
    
    score_ave = sum(score_data) / len(score_data)
    score_dispersion = float()
    for data in score_data:
        
        score_dispersion += (data - score_ave) ** 2
    
    standard_deviation.append(math.sqrt(score_dispersion / len(score_data)))


for i in standard_deviation:
    print(f"{i:.8f}")

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0:
        break
    a = 0
    nums = [int(e) for e in input().split()]
    for i in range(n):
        a = a + (nums[i]-sum(nums)/n)**2
    a = a / n
    print(math.sqrt(a))

Solution (Python):
import statistics
ans = []
while True:
    n = int(input())
    if n == 0:
        break
    data = list(map(int, input().split()))
    v = statistics.pstdev(data)
    ans.append(v)
for a in ans:
    print(a)

Solution (Python):
while True:
    n=int(input())
    if n==0:
        exit()
    *a,=map(int,input().split())
    m=sum(a)/len(a)
    s=(sum([(m-ai)**2 for ai in a])/len(a))**0.5
    print(s)

Solution (Python):
import math

while True:
    n = int(input())  

    if n == 0:
        break

    lst = list(map(int,input().split()))  
    m = sum(lst)/n  

    val = 0.0

    for i in range(n):
        val += (lst[i] - m)**2

    print(math.sqrt(val/n))

Solution (Python):
import math as math
while True:
    num = int(input())
    if num ==0:
        break
    point = list(map(float,input().split()))
    ave = sum(point)/len(point)
    preS = 0
    for i in range(num):
        preS = preS + (point[i]-ave)**2
    sigma = math.sqrt(preS / num)
    print('{:.8f}'.format(sigma))

Solution (Python):
import math
while True:
    
    n = int(input())
    if n == 0:
        break
    else:
        pass
    
    s = list(map(int, input().split()))
    
    m = sum(s) / len(s)
    
    result = 0
    for i in range(n):
        result += pow(s[i] - m, 2)
        
    result = result / n
    
    print(pow(result, 0.5))

Solution (Python):
import math
while True:
	n = int(input())
	if n==0:
		break
	data = list(map(int, input().split()))
	m = sum(data)/n
	print("{:.10f}".format(math.sqrt(sum(((x-m)**2 for x in data))/n)))

Solution (Python):
import math

while True:

    
    n = int(input())
    if n == 0:
        break
    
    
    score = [i for i in map(int, input().split())]
    
    
    m = sum(score) / n
    tmp = 0
    for j in range(n):
        tmp += (score[j] - m) ** 2
    a = math.sqrt(tmp / n)
    print(a)

    continue

Solution (Python):
import math


if __name__ == "__main__":

    while(True):
        n = int(input())

        if n == 0:
            break

        param = input().split(" ")
        scores = [int(a) for a in param]

        average = sum(scores)/len(scores)
        variance = sum([(a - average)**2 for a in scores])/len(scores)
        stddev = math.sqrt(variance)

        print(str(stddev))

Solution (Python):
from enum import Enum
import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


while True:
    N = int(input())
    if N == 0:
        break
    table = list(map(int,input().split()))

    tmp_sum = 0
    for i in range(len(table)):
        tmp_sum += table[i]
    B = tmp_sum/len(table) 

    squared_sum = 0
    for i in range(len(table)):
        squared_sum += table[i]*table[i]
    A = squared_sum/len(table)

    print("%.10f"%(math.sqrt(A-B*B)))

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    scores = [float(i) for i in input().split()]
    mean = sum(scores) / n
    std = (sum([(i - mean)**2 for i in scores]) / n) ** 0.5
    print(std)

Solution (Python):
while 1:
    n=int(input())
    if n==0: break
    s=[int(i) for i in input().split()]
    m=sum(s)/n
    a=(sum([(i-m)**2 for i in s])/n)**0.5
    print(a)

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    m = sum(s) / len(s)
    sig = 0
    for i in range(len(s)):
        sig += (s[i]-m)**2
    a = math.sqrt(sig/n)
    print('{:.8f}'.format(a))

Solution (Python):
import statistics as st

while True:
    student_n = int(input())
    if student_n == 0:
        break
    
    score_lst = map(int, input().split())
    
    print(st.pstdev(score_lst))

Solution (Python):
while True:
    num = int(input())
    if num == 0:
        break
    else:
        sigma = 0
        score = list(map(int, input().split(" ")))
        mean = sum(score) / num
        for i in range(num):
            sigma += (score[i] - mean) ** 2
        alfa = (sigma / num) ** 0.5
        print(round(alfa, 8))

Solution (Python):
import math
ans=[]
while(True):
	n=int(input())
	if(n==0):
		break
	s=list(map(int,input().split()))
	ave=sum(s)/n
	diff_sum_bi=sum([(s[i]-ave)**2 for i in range(n)])
	variance=diff_sum_bi/n
	ans.append(math.sqrt(variance))

for i in range(len(ans)):
	print(ans[i])

Solution (Python):
from math import *
while True:
    n = int(input())
    if n == 0:
        exit()
    s = list(map(int, input().split()))
    m = sum(s) / n
    a = sqrt(sum(map(lambda x: pow((x - m), 2), s)) / n)
    print(a)

Solution (Python):
import math
while True:
    n = int(input())
    if n==0:
        break
    s = list(map(int, input().split()))
    sum = 0.0
    for i in range(n):
        sum += s[i]
    average = sum / n
    a2 = 0.0
    for i in range(n):
        a2 += (s[i]-average)**2 / n
    a = math.sqrt(a2)
    print('%.8f'%a)

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    data = list(map(int, input().split()))
    ave = sum(data) / len(data)
    a = 0
    for i in range (n):
        a += (data[i] - ave)**2
    k = (a/n)**0.5
    print(k)

Solution (Python):
from math import *
while True:
    n=int(input())
    if n==0:
        break
    s=list(map(int,input().split()))
    m=sum(s)/n
    s2=0
    for i in s:
        s2+=(i-m)**2
    print(sqrt(s2/n))

Solution (Python):
while input()!='0':
    v=list(map(int, input().split()))
    m=sum(v)/len(v)
    sum_sq=0
    for i in range(len(v)):
        sum_sq=(v[i] -m)**2+ sum_sq
    
    print((sum_sq/len(v))**0.5)

Solution (Python):
devlist = []
while True:
    n = int(input())
    if n == 0:
        break
    else:
        s = list(map(float, input().split()))
        vari = 0
        mean = sum(s)/n
        for i in range(n):
            vari += ((s[i]-mean)**2)/n
        stdev = vari ** 0.5
        devlist.append(stdev)

for i in range(len(devlist)):
    print("{:8f}".format(devlist[i]))

Solution (Python):
while True:
    n = int(input())
    if n==0:
        break
    s = list(map(int,input().split()))
    m = sum(s)/n
    sd = (sum(list(map(lambda x:(x-m)**2,s)))/n)**0.5
    print(sd)

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0:
        break
    a = list(map(int, input().split()))
    a2 = list(map(lambda x: x**2, a))
    av = sum(a) / len(a)
    print(math.sqrt(sum(a2) / len(a2) - av**2))

Solution (Python):
import math
  
while True:
    n = int(input())
    if n==0:
        break

    s = [ float(s) for s in input().split() ]
    m = sum(s)/n
    a2 = [ (d-m)**2 for d in s ]
    print(math.sqrt(sum(a2)/n))

Solution (Python):
from math import *
from statistics import *
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    while input()!="0":
        aa = list(map(int, input().split()))
        print(pstdev(aa))

main()

Solution (Python):
while True:
  n = int(input())
  if n == 0:
    break
  else:
    l = list(map(int, input().split()))
    s = 0
    sq = 0
    for i in range(n):
      s += l[i]
    m = s/n
    for i in range(n):
      sq += (l[i]-m)**2
    alpha = (sq/n)**0.5
    print(alpha)

Solution (Python):
results = []

while True:
    n = int(input())

    if n == 0:
        break

    l = list(map(int, input().split()))

    mean = sum(l) / n

    res = 0
    for i in range(n):
        res += (mean - l[i]) ** 2

    results.append((res/n) ** (1/2))

for result in results:
    print(result)

Solution (Python):
import math
while True:
    n = int(input())
    if n==0:
        break
    else:
        l = input().split()
        m = 0.0000
        s = 0.0000
        for i in range(n):
            m = m + float(l[i])
        m = m/n
        for i in range(n):
            s = s + (float(l[i])-m)**2
        print(math.sqrt(s/n))

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break

    S = list(map(int, input().split()))
    avg = sum(S) / n    
    x = 0
    for s in S:
        x += (s - avg)**2
        
    print(math.sqrt(x/n))

Solution (Python):
from statistics import pstdev

while True:
    n = int(input())
    if n == 0:
        break
    l = list(map(int, input().split()))
    print(pstdev(l))

Solution (Python):
while True:
    n = int(input())
    
    if n == 0:
        break
    
    S = [int(i) for i in input().split()]
    m = sum(S) / n
    
    a2 = sum([(s-m)**2 for s in S]) / n
    
    print(a2**0.5)

Solution (Python):
from math import sqrt
while True:
    n=int(input())
    if n==0:break
    s=list(map(int,input().split()))
    ave=0
    for i in s:
        ave+=i
    ave=ave/n
    var=0
    for i in s:
        var+=(i-ave)**2
    var=var/n
    std=sqrt(var)
    print(std)

Solution (Python):
import math
a,x = 0,0
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(int,input().split()))
    for i in s:
        a += i
    h = a/n
    for i in s:
        x += (i-h)**2
    print(math.sqrt(x/n))
    a,x = 0,0

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break
    a = list(map(int, input().split()))
    ave = sum(a)/n
    sigma = 0
    for i in range(n):
        sigma += (a[i]-ave)**2
    print(math.sqrt(sigma/n))

Solution (Python):
from math import *
n = int(input())
while True:
    if n == 0:
        break
    ss = list(map(int, input().split()))
    avr = sum(ss)/n
    s2 = sum([(x - avr)**2 for x in ss]) / n
    print(sqrt(s2))
    n = int(input())

Solution (Python):
while True:
    n=int(input())
    if n==0:
        break
    else:
        score=list(map(int, input().split()))
        s_average=sum(score)/n
        devia=(sum(list(map(lambda x: (s_average-x)**2,score)))/n)**0.5
        print(devia)

Solution (Python):
import math
while (int(input())):
    x=[float(k) for k in input().split()]
    n=len(x)
    m=sum(x)/n
    print(math.sqrt(sum([(t-m)**2 for t in x])/n))

Solution (Python):
import statistics

while True:
    dev = input()
    if dev == '0': break
    
    l = [float(i) for i in input().split()]
    pstdev = statistics.pstdev(l)
    print(pstdev)

Solution (Python):
import math
n = int(input())
while(n != 0):
    s = []
    s[:] = map(int,input().split())
    sigma2 = 0.0
    average = 0.0
    for _ in range(0,n):
        average += s[_]

    average = average / float(n)

    for _ in range(0,n):
        sigma2 += (s[_]-average)**2
    sigma2 = sigma2 / float(n)
    sigma = math.sqrt(sigma2)
    print(sigma)
    n = int(input())

Solution (Python):
while True:
    n = float(input())
    if n ==0:
        break
    else:
        s = list(map(int, input().split(" ")))
        m = sum(s)/n
        wa =0
        for i in range(len(s)):
            wa += (s[i]-m)**2
        print((wa/n)**0.5)

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0:
        break
    else:
        arr_s = list(map(int, input().split()))
        m = sum(arr_s) / n
        t = 0
        for si in arr_s:
            t += (si - m) ** 2
        print(math.sqrt(t / n))

Solution (Python):
from statistics import pstdev

while input()!="0":
   s=list(map(int,input().split()))
   print(pstdev(s))

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break

    s = list(map(int, input().split()))
    m = sum(s) / n
    v = 0
    for si in s:
        v += (si - m) ** 2
    ans = (v / n) ** 0.5
    print("{:.5f}".format(ans))

Solution (Python):
import math
while True:
    N = int(input())
    if N == 0:break
    table = list(map(int,input().split()))

    B = sum(table)/N

    squre_table =  [i ** 2 for i in table]
    A = sum(squre_table)/N
    
    print("%.10f"%(math.sqrt(A-B*B)))

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0:
        break
    points = list(map(int, input().split()))
    m = sum(points) / len(points)
    t = 0
    for i in range(n):
        t += (points[i] - m)**2
    a2 = t/n
    print(math.sqrt(a2))

Solution (Python):
import statistics as st
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(float, input().split()))
    print(st.pstdev(s))

Solution (Python):
import math
while True:
    n=int(input())
    if n==0:
        break

    scores=[]
    total=0

    scores=list(map(int,input().split(" ")))
    for score in scores:
        total+=score

    average=total/len(scores)
    hensa=0

    for score in scores:
        hensa+=(score-average)**2

    std=math.sqrt(hensa/len(scores))
    print("{:.8f}".format(std))

Solution (Python):
import math
while(1):
    n=int(input())
    s=[]
    if n== 0:
        break
    s=list(map(int,input().split()))
    mean = int(sum(s))/int(len(s))
    ss=0
    for i in range(len(s)):
        ss += (s[i]-mean)**2
    std = math.sqrt(ss/n)
    print(std)

Solution (Python):
import math
while True:
    n=int(input())
    if n==0:
        break
    s=list(map(int,input().split()))
    m=sum(s)/n
    d=math.sqrt(sum((m-i)**2 for i in s)/n)
    print(d)

Solution (Python):
from math import sqrt

results = []

while True:
    n = int(input())
    if n == 0:
        break
    points = list(map(int, input().split()))
    
    mid = sum(points) / n
    variance = 0
    for point in points:
        variance += (point - mid) ** 2
    variance /= n
    
    deviation = sqrt(variance)
    results.append(deviation)

for result in results:
    print(result)

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    else:
        s = list(map(int, input().split()))
        m = 0
        for i in range(n):
            m += s[i]
        m = m/n

        a2 = 0
        for j in range(n):
            a2 += (s[j]-m)**2
        a2 = a2/n

        print(a2**0.5)

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    else:
        lst = list(map(int,input().split()))
        sum1 = sum(lst)
        m = sum1 / n
        for i in range(n):
            lst[i] = (lst[i] - m)**2
        sum2 = sum(lst)
        α = (sum2 / n)**0.5
        print('{:.8f}'.format(α))

Solution (Python):
while 1:
    n=int(input())
    if n==0:break
    box=list(map(float,input().split()))
    mean=sum(box)/n
    for i in range(n):
        box[i]=(box[i]-mean)**2
    print("%.10f"%((sum(box)/n)**0.5))

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    S = list(map(int, input().split()))
    avg = sum(S)/n
    ans = (sum([(avg-i)**2 for i in S])/n) ** 0.5
    print(str(ans))

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break
    point = list(map(int, input().split()))
    ave = sum(point)/n
    p_list = [(x-ave)**2 for x in point]
    stdv = math.sqrt(sum(p_list) / n)
    print('{:.8f}'.format(stdv))

Solution (Python):
import math

while True:
    n = int(input())
    if n == 0:
        break
    else:
        s = list(map(int,input().split()))
        m = sum(s)/n
        a = 0
        for i in s:
            a += (i - m)**2
            ans = math.sqrt(a/n)
        print(ans)

Solution (Python):
from statistics import pstdev

while True:
    n = int(input())
    if not n:
        break
    li = [int(i) for i in input().split()]
    print(pstdev(li))

Solution (Python):
while 1:
    n = int(input())
    if n == 0: break
    s = [int(x) for x in input().split()]
    m = sum(s) / len(s)
    tmp = 0
    for _ in s:
        tmp += (_ - m) ** 2
    alpha = (tmp / len(s)) ** 0.5
    print(format(alpha,  '.6f'))

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    a = [float(i) for i in input().split()]
    average = sum(a) / n
    print((sum([(i - average) ** 2 for i in a]) / n) ** 0.5)

Solution (Python):
import math
while True:
    n=int(input())
    if n==0:
        break
    sum=sqsum=0.0
    l=list(map(float,input().split()))
    for e in l:
        sum+=e
        sqsum+=e**2
    mean=sum/n
    sqmean=sqsum/n
    var=sqmean-mean**2
    std=math.sqrt(var)
    print('{:.8f}'.format(std))

Solution (Python):


import math

while True:
    n = int(input())
    if n == 0:
        exit()
    else:
        scores = list(map(int, input().split()))
        avrscr = sum(scores) / n
        sd = 0
        for i in scores:
            sd += (i - avrscr) ** 2
        sd /= n
        sd = math.sqrt(sd)
        print(sd)

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(int,input().split()))
    
    m = sum(s)/n

    total = 0
    for i in range(n):
        total += (s[i]-m)**2
    ans = (total/n)**0.5
    print(ans)

Solution (Python):
import math
while True:
    n=int(input())
    if n == 0 : break
    s=list(map(int,input().split()))
    sumv = 0
    for x in s: sumv += x
    mean = sumv/n
    aa=0
    for x in s: aa+=(x-mean)*(x-mean)
    aa/=n
    a = math.sqrt(aa)
    print(f"{a:.5f}")

Solution (Python):
from statistics import pstdev

while 1:
    n = int(input())
    if n == 0:break
    s = list(map(float, input().split()))
    print(pstdev(s))

Solution (Python):
import math
while True:
    num = int(input())
    if num == 0:
        break
    
    l = [int(x) for x in input().split()]
    average = sum(l)/len(l)
    div = 0
    for i in l:
        div += (i - average) **2
    
    div = math.sqrt(div/len(l))
    print(div)

Solution (Python):
while True:
	n = int(input())
	if n == 0:
		break
	list = [int(s) for s in input().split()]
	m=sum(list)/n
	x = 0
	for i in range(n):
		x +=(list[i]-m)**2
	a = (x/n)**0.5
	print(a)

Solution (Python):
import math
while True:
    n = int(input())
    if n==0:
        break
    x = list(map(int,input().split()))

    average = sum(x)/n

    stdev = 0
    for i in range(n):
        stdev+=(x[i]-average)**2
        
    stdev/=n
    print(math.sqrt(stdev))

Solution (Python):
import sys

def test():

	state = 0

	for inputs in sys.stdin:

		if state == 0:
			n = int(inputs)
			if n == 0:
				break
			state = 1
		else:
			score_array = list(map(int,inputs.split()))

			m = 0.0
			for score in score_array:
				m += score
			m = m / n

			sigma = 0.0
	
			for score in score_array:
				sigma += (score-m)**2/n
			sigma = sigma**0.5
			print(sigma)
			
			state = 0


if __name__ == "__main__":
	test()

Solution (Python):
while True:
    n = int(input())
    if n == 0:
        break
    samples = list(map(float,input().split()))
    
    m = 0
    for sample in samples:
        m += sample
    m = m / len(samples)
    
    a2 = 0
    for sample in samples:
        a2 += (sample - m) ** 2 / len(samples)
        
    print(a2 ** 0.5)

Solution (Python):
import math as math

while 1:
    n = int(input())
    if n == 0:
        break

    s = list(map(float, input().split()))

    su = sum(s)
    m = su / n

    a = 0

    for i in range(n):
        a += ((s[i] - m) ** 2) / n

    print(math.sqrt(a))

Solution (Python):

while True:
    n = int(input())
    if n == 0:
        break
 
    s = list(map(int, input().split()))
    m = sum(s) / n
    v = 0
    for si in s:
        v += (si - m) ** 2
    ans = (v / n) ** 0.5
    print("{:.5f}".format(ans))