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
sigma=[]
while(True):
    N=int(input())
    if N==0:
        break
    s=[int(i) for i in input().split()]
    av=sum(s)/N
    sg=math.sqrt(sum([(s[i]-av)**2 for i in range(N)])/N)
    sigma.append(sg)
for sg in sigma:
    print(sg)

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0: break
    s = list(map(int, input().split()))
    ave = sum(s) / n
    S = []
    for i in range(n):
        key = ave - s[i]
        S.append(key * key)
    print('{:.5f}'.format(math.sqrt(sum(S) / n)))

Solution (Python):


import math

while True:
    n = int(input())

    if n == 0:
        break

    s = list(map(float, input().split()))
    mean = sum(s) / len(s)

    for i in range(len(s)):
        s[i] = (s[i] - mean) * (s[i] - mean)

    variance = sum(s) / len(s)
    stdev = math.sqrt(variance)

    print(stdev)

Solution (Python):



import math

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

    sum = 0
    for num in s:
        sum += num
    m = sum/n

    tmp_sum = 0
    for num in s:
        tmp_sum += pow(num - m, 2)

    print("%.5f"%(math.sqrt(tmp_sum/n)))

Solution (Python):
import math
while 1:
    N = int(input())
    if N == 0:
        break
    xs = list(map(int, input().split()))
    avg = 0
    for x in xs:
        avg += x
    avg /= len(xs)
    var = 0
    for x in xs:
        var += (x - avg) ** 2
    var /= len(xs)
    print(math.sqrt(var))

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):
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
n=int(input())
while n != 0 :
	sums = 0.0
	s = list(map(float,input().split()))
	m = sum(s)/n
	for i in range(n):
		sums += ((s[i]-m)**2)/n
	print(math.sqrt(sums))
	n = int(input())

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

Solution (Python):
import math

A=[]
while True:
    n=int(input())
    if n==0:
        break
    s=input().split()
    
    
    
    i=0
    su=0
    while i<n:
        su+=int(s[i])
        i+=1
    m=su/n

    l=0
    H=0
    while l<n:
        H+=(int(s[l])-m)*(int(s[l])-m)/n
        l+=1
    h=math.sqrt(H)
    A.append(h)

for Ans in A:
    print(Ans)

Solution (Python):
import math

while True:
    n = float(input())
    aan = 0
    if n == 0:
        break
    scores = list(map(float, input().split()))
    total = sum(scores)
    avg = total / len(scores)
    for score in scores:
        aan += (score - avg)**2
    aa = aan / len(scores)
    a = math.sqrt(aa)
    print(a)

Solution (Python):
while True:
    n = int(raw_input())
    if n == 0: break
 
    x = map(int, raw_input().split())
    ave = sum(x) / float(n)
    std = (sum([(e-ave)**2 for e in x])/n)**0.5
    print std

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

Solution (Python):
import math


def standard_deviation():
    average = sum(s) / n  
    total_deviation = 0
    for element in s:
        total_deviation += (element - average)**2 

    return math.sqrt(total_deviation / n) 


while True:
    n = int(input())
    if n == 0: break
    s = [int(s) for s in input().split()]
    print('{0:.5f}'.format(standard_deviation()))

Solution (Python):


import math

def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        n = int(input())
        if n == 0: break
        data = intinput()
        sum_1 = 0  
        sum_2 = 0  
        for i in range(n):
            sum_1 += data[i]; sum_2 += data[i] ** 2
        
        sigma = math.sqrt((sum_2 / n) - ((sum_1 / n) ** 2))
        print(sigma)

if __name__ == "__main__":
    main()

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0: break
    s = [int(e) for e in input().split()]
    average = sum(s) / n
    total = 0
    for e in s:
        total += (e - average)**2 
    print("{0: .4f}".format(math.sqrt(total/n)))

Solution (Python):
import math
while 1:
    n = int(input())
    if n == 0 :
        break
    a = list(map(int,input().split()))
    ave = sum(a)/n
    s = 0
    for i in range(n):
        s += (a[i] - ave)**2
    s2 = math.sqrt(s / n)
    print("%.9f"%s2)

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0:
        break
    li = list(map(int, input().split()))
    avg = sum(li)/n
    S = sum([(li[i]-avg)**2 for i in range(n)]) / n
    print(f"{math.sqrt(S):0.9f}")

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]
	m = sum / n
	a = 0
	for i in range(n):
		a += (s[i] - m)**2
	print(math.sqrt(a / n))

Solution (Python):
n = int(input())
while n:
    d  = [int(i) for i in input().split()]
    print((sum([(i - sum(d) / n)**2 for i in d]) / n)**0.5)
    n = int(input())

Solution (Python):
import math


result = []
n = int(input())

while n != 0:
    d = list(map(int, input().split()))
    mean = sum(d) / n
    var = [(i - mean) ** 2 for i in d]
    var = math.sqrt(sum(var) / n)
    result.append(var)
    
    n = int(input())

for i in result:
    print(i)

Solution (Python):
import math


result = []
n = int(input())

while n != 0:
    d = list(map(int, input().split()))
    mean = sum(d) / n
    var = [(i - mean) ** 2 for i in d]
    var = math.sqrt(sum(var) / n)
    result.append(var)
    
    n = int(input())

for i in result:
    print(i)

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

Solution (Python):
import math

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

    s = input().strip().split()
    for i in range(0, len(s)) :
        s[i] = float(s[i])

    m = sum(s)/n

    sigma = sum( [ ( si - m ) ** 2 for si in s ] )

    a = math.sqrt( sigma/n )
    print("{0:.8f}".format(a))

Solution (Python):


end = 0
while end == 0:
    studentAmount = int(input())
    if studentAmount == 0:
        end += 1
    else:
        scoreData = [int(i) for i in input().rstrip().split()]
        totalScore = 0
        for score in scoreData:
            totalScore += score
        averageScore = totalScore / studentAmount
        
        totalSquareDistance = 0
        for score in scoreData:
            totalSquareDistance += (score - averageScore) ** 2
        variance = totalSquareDistance / studentAmount
        
        standardDeviation = variance ** 0.5
        
        print(str(standardDeviation))

Solution (Python):
import math
n = int(input())
while (n != 0):
    nlist = list(map(float, input().split()))
    sum = 0
    for i in range(n):
        sum += nlist[i]
    aver = sum/n
    var = 0
    for i in range(n):
        var += (nlist[i] - aver)**2 / n
    dev = math.sqrt(var)
    print(dev)
    n = int(input())

Solution (Python):
import math

while True:
	d =0
	n = int(input())
	if n == 0:
		break
	s = list(map(int, input().split()))
	avg = sum(s) / len(s)
	for i in s:
		c = (i - avg) ** 2
		d += c
	a2 = d / len(s)
	print(math.sqrt(a2))

Solution (Python):
import math

while True:
    n = int(raw_input())
    if n == 0:
        break
    s = map(int, raw_input().split())
    m = float(sum(s)) / n
    a2 = (sum(map(lambda x: (x-m)**2, s))) / n
    a = math.sqrt(a2)
    print("%f" % (a, ))

Solution (Python):
import sys
 
mode = 0
for line in sys.stdin:
    if mode == 0:
        n = int(line.strip('\n'))
        if n == 0: break
        mode = 1
    elif mode == 1:
        x = [float(i) for i in line.strip('\n').split()]
        ave = sum(x) / n
        std = (sum([(i-ave)**2 for i in x])/n)**0.5
        print std
        mode = 0

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

    x = map(int, raw_input().split())
    ave = sum(x) / float(n)
    std = (sum([(e-ave)**2 for e in x])/n)**0.5
    print std

Solution (Python):
import math
while 1:
        n=input()
        if n==0:
                break
        s=map(int,raw_input().split())
        m=0.0
        for i in range(n):
                m+=s[i]
        m=m/n
        a=0.0
        for i in range(n):
                a+=(s[i]-m)**2
        a=(a/n)**0.5
        print a

Solution (Python):
from __future__ import division, print_function
from sys import stdin
from math import sqrt
while True:
    n = int(stdin.readline())
    if n == 0:
        break
    data = [float(s) for s in stdin.readline().split()]
    m = sum(data) / len(data)
    print('{:.4f}'.format(sqrt(sum((s-m)**2 for s in data) / n)))

Solution (Python):


import sys
import io
import re
import math

while True:

    n = int(raw_input())
    if n==0: break
    l = map(float, raw_input().split())

    avg=sum(l)/len(l)
    naka=0
    for i in l:
        naka+=(i-avg)**2
    hyo2 = naka/n
    print (hyo2)**0.5

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

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

Solution (Python):
while True:
	n = input()
	if n == 0:
		break
	s = map(float, raw_input().split())
	v = sum(map(lambda x: x**2, s)) / n - (sum(s) / n)**2
	print v**0.5

Solution (Python):
import math
while True:
    n = int(raw_input())
    if n == 0:
        break
    stdnt = map(int, raw_input().split())
    ave = 0
    for score in stdnt:
        ave += float(score)/n
    alpha = 0
    for score in stdnt:
        alpha += (score-ave) ** 2/n
    print math.sqrt(alpha)

Solution (Python):
import math

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

Solution (Python):
while True:
  n = int(input())
  s = []
  if n == 0:
    break
  s = list(map(int, input().split()))
  m = sum(s) / n
  v = 0
  for i in s:
    v += (i - m) ** 2
  ans = (v / n) ** (1/2)
  print('{:10f}'.format(ans))

Solution (Python):
while True:
    n=int(input())
    import statistics
    if n==0:
        break
    s=list(map(int,input().split()))
    x=float('{:.6f}'.format(statistics.pstdev(s))) 
    print(x)

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

   s = list(map(int, input().split()))
   
   m = sum(s) / n
   b = 0
   for i in range(n):
      b += (s[i] - m) ** 2
   
   ans = (b / n) ** 0.5
   print(ans)

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

Solution (Python):
i=0
while True:
    N=int(input())
    if N==0:
        break
    else:
        a = list(map(float,input().split()))
        m=sum(a)/N
        
        for i in range(N):
            a[i]=(float)(a[i]-m)**2
            
            i+=1
        
        A=(sum(a)/N)**(1/2)
        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)
    a=0
    for i in range(n) :
        a+=(s[i]-m)**2
    a/=n
    a=math.sqrt(a)
    print(a)

Solution (Python):
import math

A=[]
while True:
    n=int(input())
    if n==0 :
        break
  
  
    else :
        b=list((map(int,input().split())))
        ave=sum(b)/n
        for i in range(n):
            A.append((ave-b[i])**2)
        p=math.sqrt(sum(A)/n)
        print("{:.8f}".format(p))
        A.clear()

Solution (Python):
n=int(input())
while n!=0:
    S=0
    
    l=input().rstrip().split()
    l=list(map(int,l))
    
    m=sum(l)/len(l)
    
    for i in range(len(l)):
        S+=(l[i]-m)**2
    print((S/len(l))**(1/2))
    n=int(input())

Solution (Python):
while input()!='0':
    n=list(map(int,input().split()))
    b=len(n)
    a=sum(n)/b
    print((sum((x-a)**2 for x in n)/b)**0.5)

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

Solution (Python):
import math
while True:
    x = []
    n = int(input())
    if n == 0:
        break
    x = input().split( )
    suu = [float(s) for s in x]

    kota = float(0)
    for a in suu:
        kota += ((a-sum(suu)/n)**2)/n
    print(math.sqrt(kota))

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

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

Solution (Python):
import math
import statistics
while 1:
    n = int(input())
    if n == 0:  break
    data = list(map(int, input().split()))
    
    print(statistics.pstdev(data))

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

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

Solution (Python):
import math
from statistics import mean
ans = []
while True:
	n = int(input())
	if n == 0:
		break
	s = list(map(int,input().split()))
	ss = []
	for i in s:
		ss.append(i**2)
	sd = math.sqrt(mean(ss)-mean(s)**2)
	ans.append(sd)
for k in ans:
	print(k)

Solution (Python):
while True:
    n=int(input())
    if n==0:
        break
    lst=[int(i) for i in input().split()]
    m=sum(lst)/len(lst)
    a_2=0
    for l in range(n):
        value=lst[l]
        a_2+=pow(value-m,2)/n
    print(pow(a_2,0.5))

Solution (Python):
while True:
    n=int(input())
    import statistics
    if n==0:
        break
    s=list(map(int,input().split()))
    a=float('{:.6f}'.format(statistics.pstdev(s))) 
    print(a)

Solution (Python):
while 1:
    N = int(input())
    if not N:
        break
    *A, = map(int, input().split())
    V = sum(A)/N
    print((sum((a - V)**2 for a in A)/N)**0.5)

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

while True:
    n=int(input())
    if n==0:
        break
    s=list(map(int,input().split()))
    
    sum1=0
    for i in range(len(s)):
        sum1+=s[i]
    a=sum1/len(s)
    
    sum2=0
    for i in range(len(s)):
        sum2+=s[i]*s[i]
    b=sum2/len(s)
    
    print("%.10f"%(math.sqrt(b-a*a)))

Solution (Python):


import math

while True:
    n=int(input())
    
    if n==0:
        break
    else:
        S=[int(s) for s in input().split()]
        a2=0
        
        m=sum(S)/n
        
        for i in range(n):
            a2+=(S[i]-m)**2
            a=math.sqrt(a2/n)

    print(f'{a:.5f}')

Solution (Python):
import math
while True:
  n=int(input())
  if n==0:
    break
  s=[int(0) for i in range(n)]
  s[:]=(int(x) for x in input().split())
  
  m=sum(s)/n
  a2=0
  for i in range(n):
    a2+=(s[i]-m)**2
  a2/=n
  print('{:.05f}'.format(math.sqrt(a2)))

Solution (Python):
import math

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


    h = sum(A) / len(A);
    k = 0;
    for j in range(0,n):
        k += (A[j] - h)**2;
    print(math.sqrt(k/n));

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):
import math
while True:
    n=int(input())
    if n==0:
        break
    s=list(map(int,input().split()))
    m=sum(s)/n
    aa=0
    for i in s:
        aa+= (i-m)**2
    a=math.sqrt((aa)/n)
    print(f'{a:.08f}')

Solution (Python):
import math

for i in range(1000):
    
    n=float(input())
    if n==0:
        break
    
    s= list(map(float, input().split()))
    m=sum(s)/n
    
    X=[]
    n=int(n)
    for j in range (n):
        x=(s[j]-m)**2
        X.append(x)
    a=math.sqrt(sum(X)/n)
    print(f'{a:.08f}')

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

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

Solution (Python):
import math


while True:
    n = int(input())
    if n == 0:
        break
    *A, = map(int, input().split())
    m = sum(A) / n
    s2 = sum((a - m) ** 2 for a in A) / n
    print("{:.8f}".format(math.sqrt(s2)))

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

  scr = list(map(int, input().split()))
  avg = sum(scr) / n
  v = 0
  for scri in scr:
    v += ((scri - avg) ** 2 ) / n
  a = v ** 0.5
  print(a)

Solution (Python):
from math import sqrt
def solve(n):
  s = list(map(float,input().split()))
  m = sum(s)/n
  a = sqrt(sum([(si-m)**2 for si in s])/n)
  print('{0:.6f}'.format(a))

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

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

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):
import statistics
while 1:
    N = int(input())
    if N == 0:
        break
    else:
        data = list(map(int,input().split()))
        print(statistics.pstdev(data))

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

Solution (Python):
for i in range(1000):
    n = int(input())
    if n == 0:
        exit()
    s = list(map(int,input().split()))
    ave = sum(s) / len(s)
    num = 0
    for j in s:
        num += (j-ave)**2
    num /= len(s)
    print(num**(1/2))

Solution (Python):
from math import sqrt

while True:
    n = int(input())
    if n == 0:
        break
    
    lst = list(map(float,input().split()))
    ave = sum(lst) / len(lst)
    alpha = 0.0
    for i in lst:
        alpha += (ave - i)**2
    S = sqrt((alpha/n))
    print(S)

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

Solution (Python):
while True:
    N = int(input())
    if N == 0:
        break
    sum = 0
    s = input().split()
    for i in range(N):
        sum += int(s[i])
    mean = sum/N
    t = 0
    for j in range(N):
        t += (int(s[j]) - mean)**2
    b = t / N
    a = b**0.5
    print('{:.08f}'.format(a))

Solution (Python):



import math

while True :
    n = int(input())
    
    if n == 0 :
        break
    else :
        S = [int(s) for s in input().split()]
        a2 = 0
        
        m = sum(S) / n
        
        for i in range(n) :
            a2 += (S[i] - m) ** 2
            
        a = math.sqrt(a2 / n)

    print(f"{a:.5f}")

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
    s=list(map(int,input().split()))
    m=sum(s)/n
    a=0
    for i in range(n):
        a+=(s[i]-m)**2
    b=math.sqrt(a/n)
    print(b)

Solution (Python):



import math


def main():
    while True:
        n = int(input())
        if n == 0:
            break
        s = list(map(int, input().split()))
        m = sum(s) / n
        aan = 0
        for i in range(n):
            aan += (s[i] - m)**2
        print(f"{math.sqrt(aan/n):.4f}")


if __name__ == '__main__':
    main()

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

Solution (Python):
import statistics

while True:
    n = int(input())
    if n == 0:
        break
    scores = list((int(x) for x in input().split()))
    
    std = statistics.pstdev(scores)
    
    print("{0:.8f}" . format(round(std,8)))

Solution (Python):
while 1:
    N = int(input())
    if not N:
        break
    *A, = map(int, input().split())
    V = sum(A)/N
    print((sum((a - V)**2 for a in A)/N)**0.5)

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

Solution (Python):
while input()!='0':
    n=list(map(int,input().split()))
    b=len(n)
    a=sum(n)/b
    print((sum((x-a)**2 for x in n)/b)**0.5)

Solution (Python):
from statistics import mean
import math

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

Solution (Python):
def bunsan(n,S): 
    ave = sum(S)/n
    D = 0
    
    for i in range(n):
        D += (S[i] - ave)**2
    return (D/n)**(1/2)

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

Solution (Python):
import statistics

while True:
    n = int(input())
    if n == 0:
        break
    scores = list((int(x) for x in input().split()))

    std = statistics.pstdev(scores)

    print("{0:.8f}" . format(round(std, 8)))

Solution (Python):
from math import sqrt
from statistics import mean
while True:
    n = int(input())
    if n == 0:
        break
    else:
        L = list(map(int, input().split()))
        m = mean(L)
        temp = list(map(lambda x: (x-m)**2, L))
        SD = sqrt(sum(temp) / len(L))
        print(SD)

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

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

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

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

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

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 as ma

while True:
    n = int(input())

    if (n == 0):
        break

    score = list(map(int,input().split()))
    m = sum(score)/len(score)
    tmp = [0]*len(score)
    for i in range(len(score)):
        tmp[i] = float((score[i]-m)**2)

    s = sum(tmp)
    div =ma.sqrt(s/len(score))
    print(div)

Solution (Python):
import math
while True:
    N=int(input())
    if N==0:
      exit()
    se=0
    L=list(map(int,input().split()))
    ave=sum(L)/N
    for i in range(N):
        se+=(L[i]-ave)*(L[i]-ave)
    ans=math.sqrt(se/N)
    print(round(ans,8))

Solution (Python):
import math

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

Solution (Python):
while 1:
    N = int(input())
    if not N:
        break
    *A, = map(int, input().split())
    V = sum(A)/N
    print((sum((a - V)**2 for a in A)/N)**0.5)

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

Solution (Python):
import math

while True:
    x = int(input())
    
    if x==0:
        break
    data = list(map(float, input().split()))
    
    average = sum(data)/x
    temp = 0
    for d in data:
        temp += math.pow(d - average, 2)
        
    stdev = math.sqrt(temp / x)
    print(stdev)

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

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

Solution (Python):
import math as m
while True:
    x=int(input())
    if x==0:
        break
    else:
        y=list(map(int,input().split()))
        m=sum(y)/x
        a=0
        for i in range(0,x):
            r=(y[i]-m)**2
            a+=r
        a=a/x
        print(f'{a**(1/2):.8f}')

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

Solution (Python):
while True:
    n=int(input())
    if n==0:
        break
    s=list(map(int,input().split()))
    m2=(sum(s)/n)**2  
    nijou=[]
    for i in s:
        nijou.append(i**2)
    m3=sum(nijou)/len(nijou)  
    print('{:.8f}'.format((m3-m2)**0.5))

Solution (Python):

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

Solution (Python):
while True:
    try:
        n = int(input())
        if n==0:
            break
        S = list(map(int,input().split()))
    except:
        break
    mean = sum(S)/len(S)
    tmp = 0
    for s in S:
        tmp += ((s-mean)**2)/n
    print(tmp**0.5)

Solution (Python):
import math
while True:
    n = int(input())
    if n == 0: break
    data = list(map(float,input().split()))
    m = sum(data)/len(data)
    stdev = math.sqrt(sum([(s-m)**2 for s in data])/len(data))
    print(f"{stdev:.7}")

Solution (Python):

while True:
    N = int(input())
    if N==0:
        break
    *A, = map(int, input().split())
    V = sum(A)/N
    print((sum((a - V)**2 for a in A)/N)**0.5)

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 range(n):
      a += (s[i] - m) ** 2
   
   ans = (a / n) ** 0.5
   print(ans)

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

Solution (Python):
while True:
  n = int(input())
  if n == 0: break
  A = list(map(int, input().split()))
  m = sum(A)/n
  N = (sum((a-m)**2 for a in A)/n)**0.5
  print(f"{N:.8f}")

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

    *s,= list(map(int, input().split()))
    m = sum(s) / n
    v = 0
    for i in s:
        v += (i - m) ** 2
    ans = (v / n) ** (1/2)
    print(ans)

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(len(s)):
        sum += s[i]
    m = sum/len(s)
    
    a = 0
    for i in range(len(s)):
        a += s[i]*s[i]
    a = a/len(s)
    
    print("{0:.8f}".format(math.sqrt(a-m*m)))