Problem:


Standard Deviation

  You have final scores of an examination for n students. Calculate standard deviation of the scores s1, s2 ... sn.

The variance &alpha;2 is defined by  

&alpha;2  = (&sum;ni=1(si - m)2)/n

  where m is an average of si.

  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
s1 s2 ... sn

  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 ≤ si ≤ 100 

Sample Input

5
70 80 100 90 20
3
80 80 80
0

Sample Output

27.85677655
0.00000000



Sample input:
5
70 80 100 90 20
3
80 80 80
0


Sample output:
27.85677655
0.00000000

Submission status: Accepted

Solution code:
from statistics import pstdev

while True:
    if input() == "0":
        break
    
    print(pstdev([int(i) for i in input().split()]))

Submission status: Accepted

Solution code:
import math

while True:
  n = int(input())
  if n == 0:
    break
  st = list(map(int,input().split()))
  ave = float(sum(st)) / float(n)
  for i in range(len(st)):
    st[i] = (st[i]-ave)**2
  sigma = math.sqrt(sum(st)/float(n))
  print("{:.6f}".format(sigma))

Submission status: Accepted

Solution code:
while input()!='0':
    n_std=float(0)
    n_l=list(map(int,input().split()))
    n_av=sum(n_l)/len(n_l)
    for i in n_l:
        n_std+=(i-n_av)**2
    n_std=(n_std/len(n_l))**0.5
    print(f'{n_std:.6f}')

Submission status: Accepted

Solution code:
SDResult = []
index = 0
dataSetNum = 0
while True:
    dataNum = int(input())
    if dataNum == 0:
        break
    else:
        dataSetNum += 1
        dataSet = [int(i) for i in input().split()]
        dataSetAvg = sum(dataSet)/len(dataSet)
        SDPow2 = 0
        for index in range(len(dataSet)):
            SDPow2 += ((dataSet[index] - dataSetAvg)**2) / dataNum
        SD = SDPow2 ** (1/2)
        SDResult.append(SD)

for index in range(dataSetNum):
    print(SDResult[index])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import math

def hensa(n,*s):
    sum = 0
    for i in range(n):
        sum += s[i]
    avg = sum/n
    sum2 = 0
    for i in range(n):
        sum2 += (s[i]-avg)**2
    return math.sqrt(sum2/n)

while True:
    n = int(input().rstrip())
    if n == 0:
        break;
    s = list(map(float, input().rstrip().split()))
    print("{0:.5f}".format(hensa(n,*s)))

Submission status: Accepted

Solution code:
import statistics
while 1:
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    sd = statistics.pstdev(s)
    print(sd)

Submission status: Accepted

Solution code:
from math import sqrt


while True:
    num = int(input())
    if num:
        nums = list(map(int, input().split()))
        avg = sum(nums)/len(nums)
        sd = sqrt(sum((n-avg)**2 for n in nums)/len(nums))
        print(round(sd, 8))

    else:
        break

Submission status: Accepted

Solution code:
import math

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

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

    m1 = 0
    m2 = 0
    for x in s:
        m1 += x
        m2 += x * x
    m1 /= n
    m2 /= n

    print("{:.5f}".format((m2 - m1 * m1) ** 0.5))

Submission status: Accepted

Solution code:
import math
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(float, input().split()))
    mu = sum(s) / n
    dev = 0
    for d in s:
        dev += (d - mu)**2
    stdev = math.sqrt(dev / n)
    print(stdev)

Submission status: Accepted

Solution code:
import statistics

while True:
        num = int(input())
        if num == 0:
                break
        data = list(map(int, input().split()))
        print("{:.5f}".format(statistics.pstdev(data)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import  statistics as st

while True:
    n = input()
    if n == "0":
        break
    elif n == "1":
        _ = input()
        print(0)
    else:
        data = list(map(int, input().split()))
        print("%10f" % st.pstdev(data))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = int(input())
while n != 0:
	s = list(map(float, input().split()))
	m = 0
	for i in range(n):
		m += s[i]
	m /= n
	sd = 0
	for i in range(n):
		sd += (s[i] - m) **2
	sd = math.sqrt(sd / n)
	print('%f' % sd)
	n = int(input())

Submission status: Accepted

Solution code:
ans = []

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

    s = [int(si) for si in input().split()]
    m = sum(s) / n
    a2 = sum([(si - m) ** 2 for si in s]) / n
    ans += [a2 ** 0.5]

print("\n".join(map(lambda x: "%.5f" % x, ans)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
while(1):
    n = int(input())
    if n == 0:
        break
    s = [float(i) for i in input().split()]
    m = sum(s)/n
    a = (sum([(i- m)**2 for i in s])/n)**0.5
    print("{:.8f}".format(a))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
while 1:
    n=int(input())
    if n==0:break
    a=list(map(int, input().split()))
    a2=[(i-sum(a)/n)**2 for i in a]
    print((sum(a2)/n)**0.5)

Submission status: Accepted

Solution code:
# coding: utf-8
# coding: Shift_JIS
# coding: EUC-JP
# coding: cp932
import math

while 1:
    n = int(input())
    if n == 0:
        break
    a = list(map(int,input().split()))
    ave = sum(a)/len(a)

    ans = 0
    for i in range(n):
        ans += (a[i]-ave)**2
    ans /= n

    print("%.10f"%math.sqrt(ans))

Submission status: Accepted

Solution code:
import sys
import statistics

while True:
    n = sys.stdin.readline().strip()
    if n == '0':
        break

    data = list(map(int, sys.stdin.readline().strip().split()))
    print('{0:.8f}'.format(statistics.pstdev(data)))

Submission status: Accepted

Solution code:
import math
anslst = []
while True:
    n = int(input())
    if n == 0:
        break
    else:
        # 各データの値と平均の差の2乗の合計を、データの総数 n で割った値の正の平方根
        l = []
        x = 0
        l = list(map(float, input().split()))
        ave = sum(l)/n # 平均
        for i in range(n):
            x += (l[i] - ave) ** 2
        anslst.append(math.sqrt(x / n))
for i in anslst:
    print('{0:.8f}'.format(i))

Submission status: Accepted

Solution code:
import math  
n = int(input())
while n!= 0 :
    li = list(map(int,input().split()))
    m = sum(li)/n
    s = 0
    for i in li:
        s += (i-m)**2
        
    a = math.sqrt(s/n)
    print(a)
    n = int(input())

Submission status: Accepted

Solution code:
from statistics import pstdev

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

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

Submission status: Accepted

Solution code:
import math
while True:
    n = int(input())
    if n == 0:
        break
    arr = list(map(int, input().split()))
    m = sum(arr) / n
    acum = 0
    for x in arr:
        acum += pow(x-m, 2)
    print(f'{math.sqrt(acum/n)}')

Submission status: Accepted

Solution code:
import math
def main():
	while True:
		n = int(input())
		if n == 0:
			break
		l = list(map(int, input().split()))
		m = sum(l)/n
		k = []
		for a in l:
			k.append((a- m)**2)
		a = math.sqrt(sum(k)/n)
		print(a)

main()

Submission status: Accepted

Solution code:
import math
n=int(input())
hyoujunhensa=[]

while n!=0:
    tokuten=list(map(int,input().split()))

    average=sum(tokuten)/n
    a2=0

    for i in range(n):
        a2=a2+pow(tokuten[i]-average,2)
    a2=math.sqrt(a2/n)
    hyoujunhensa.append(a2)
    n=int(input())

for j in range(len(hyoujunhensa)):
    print(hyoujunhensa[j])

Submission status: Accepted

Solution code:

from functools import reduce
import math

while True:
    n = int(input())
    if ( n == 0 ):
        break
    l  =  list(map(int,input().split()))
    mean = float(reduce(lambda a,b:a+b,l)) / (len(l))
    t = 0
    for i in l:
        t += pow((i - mean),2)
    bunsan = float(t) / len(l)
    print (math.sqrt(bunsan))

Submission status: Accepted

Solution code:
import math,sys
for i in range(sys.maxsize):
    n=int(input())
    if n ==0:
        break
    else:
        l=list(map(int,input().split()))
        m=sum(l)/n
        x=0
        for j in range(n):
            x+=(l[j]-m)**2
        a=math.sqrt(x/n)
        print(a)

Submission status: Accepted

Solution code:
from statistics import pstdev
while input()!="0":
    lst=map(int,input().split())
    print(pstdev(lst))

Submission status: Accepted

Solution code:
from statistics import mean
import math

anslist = []

while(1):

    n = int(input())
    if n == 0:
        break
    elif n == 1:
        l = int(input())
        anslist.append(0)
    else:
        l = list(map(int, input().split()))
        ave = mean(l)
        sum = 0
        for s in l:
            sum += (s - ave)**2
        var = sum / n
        ans = math.sqrt(var)
        anslist.append(ans)

for ans in anslist:
    print(ans)

Submission status: Accepted

Solution code:
def get_avg(num_list):
    return sum(num_list) / len(num_list)

def calculate_deviation(num_list,avg):
    diff_list = []
    for num in num_list:
        diff_list.append(num-avg)
    return diff_list

def calculate_variance(num_list):
    total = 0
    for num in num_list:
        total += num**2
    return total/len(num_list)

def calculate_stdev(variance):
    return variance ** 0.5

while True:
    n = int(input())
    if n == 0:
        break
    else:
        data_set= list(map(float,input().split()))
        avg = get_avg(data_set)
        dev_list = calculate_deviation(data_set,avg)
        vrnc = calculate_variance(dev_list)
        print(calculate_stdev(vrnc))

Submission status: Accepted

Solution code:
import math
while True:
	n=int(input())
	if n==0:
		break
	else:
		s=list(map(float,input().split()))
		sum=0
		hen=0
		for i in s:
			sum+=(i/n)			
		for i in s:
			hen+=((i-sum)**2)/n
		print(round(math.sqrt(hen),8))

Submission status: Accepted

Solution code:
from statistics import variance
import math
while(1):
    n=int(input())
    if(n==0):
        break
    elif(n==1):
        data=list(map(int,input().split()))
        print(0)
    else:
      data=list(map(int,input().split()))
      print(math.sqrt(variance(data) *(n-1) /n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calculate_mean(data):
    s = sum(data)
    N = len(data)
    mean =s/N

    return mean

#平均からの偏差を求める
def find_difference(data):
    mean = calculate_mean(data)
    diff = []

    for num in data:
        diff.append(num-mean)
    return diff

def calculate_variance(data):
    diff = find_difference(data)
    #差の2乗を求める
    squared_diff = []
    for d in diff:
        squared_diff.append(d**2)

    #分散を求める
    sum_squared_diff = sum(squared_diff)
    variance = sum_squared_diff/len(data)
    return variance

while True:
    n = int(input())
    if n==0:
        break
    data = list(map(int, input().split()))
    
    variance = calculate_variance(data)
    # print('分散の値は:{0}'.format(variance))

    std = variance**0.5
    # print('標準偏差は:{0}'.format(std))
    print('{}'.format(std))

Submission status: Accepted

Solution code:
import math
while True:
    n = int(input())
    if n==0: break
    a = []
    aa = []
    for k in list(map(int, input().split())):
        a.append(k)
        aa.append(k*k)
    print(math.sqrt(sum(aa)/n-(sum(a)/n)**2))

Submission status: Accepted

Solution code:
from math import sqrt

result = []
while True:
    n = int(input())
    if (n == 0):
        break
    num = input().split()
    total = 0
    for i in num:
        total += int(i)
    average = total / n
    v = 0
    for i in num:
        v += (int(i) - average) ** 2
    result.append(sqrt(v / n))

for i in result:
    print(i)

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    Scr = list(map(int, input().split()))
    ScrSq = []

    for i in Scr:
        ScrSq.append(i**2)

    print((sum(ScrSq)/n - (sum(Scr)/n)**2)**(1/2.0))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
while True:
    n = int(input())
    if n == 0:
        break
    num = list(map(int, input().split()))
    avg = sum(num) / n
    tmp = 0
    for i in num:
        tmp+=(i-avg)**2
    print(math.sqrt(tmp/n))

Submission status: Accepted

Solution code:
import math

while True:
    n = int(input())
    if n == 0: break
    s = [float(x) for x in input().split()]
    m = sum(s)/len(s)
    s = [(_s - m) ** 2 for _s in s]
    a = math.sqrt(sum(s)/len(s))
    print(a)

Submission status: Accepted

Solution code:
while int(input()):
    score = list(map(int, input().split()))
    M = sum(score) / len(score)
    SD = (sum([(n - M) ** 2 for n in score]) / len(score)) ** 0.5
    print("{:.4f}".format(SD))

Submission status: Accepted

Solution code:
import math

while True:
    n = float(input())
    if n == 0: break
    student = list(map(float, input().split()))
    average = sum(student) / n
    deviation = [(point-average)**2  for point in student]
    dispersion = sum(deviation) / n
    sqrt = math.sqrt(dispersion)
    print(sqrt)

Submission status: Accepted

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

    print("{0:.8f}".format(a))

Submission status: Accepted

Solution code:
import math

while True:
    student_num = int(input())
    if student_num == 0:
        exit()
    
    points = list(map(int, input().split()))
    ave = sum([point for point in points]) / student_num
    sigma = sum([(num - ave) ** 2 for num in points]) / student_num
    alpha = math.sqrt(sigma)
    print(alpha)

Submission status: Accepted

Solution code:
while True:
	n = int(input())
	if n <= 0:
		break
	s = [int(x) for x in input().split()]
	m = sum(s) / n
	s = [(x - m) ** 2 for x in s]
	print('%.8f' % ((sum(s) / n) ** 0.5))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = int(input())
while not n == 0:
	ss = [float(i) for i in input().split(' ')]
	m = sum(ss)/n
	a2 = sum([(i-m)**2 for i in ss]) / n
	print(math.sqrt(a2))
	n = int(input())

Submission status: Accepted

Solution code:
import math
data = []
tmp = []
output = []
for x in range(0,10000):
    num = int(input())
    if num == 0:
        break
    else:
        tmp = input().split()
        data.append([float(tmp[i]) for i in range(num)])
        avg = sum(data[0])/num
        output.append(math.sqrt(sum(pow( data[0][i] - avg  ,2) for i in range(num))/num ))
        data.clear()
for x in range(len(output)):
    print(output[x])

Submission status: Runtime Error

Solution code:
import numpy as np

Submission status: Runtime Error

Solution code:
import Numpy as np

Submission status: Runtime Error

Solution code:
from statistics import mean, median,variance,stdev
data=[]
while True:
    data.append(input().split())
    if ["0"] in data:
        break
data=data[:-1]
data_i=[]
for i in data:
    data_i.append(list(map(lambda i:int(i),i)))
for i in data_i:
    if len(i)==1:
        pass
    else:
        print(std(i))

Submission status: Runtime Error

Solution code:
import numpy as np

Submission status: Runtime Error

Solution code:
from statistics import mean, median,variance,stdev
data=[]
while True:
    data.append(input().split())
    if ["0"] in data:
        break
data=data[:-1]
data_i=[]
def a():
    
for i in data:
    data_i.append(list(map(lambda i:int(i),i)))
for i in data_i:
    if len(i)==1:
        pass
    else:
        print(statistics.pstdev(i))

Submission status: Runtime Error

Solution code:
import statistics
data=[]
while True:
    data.append(input().split())
    if ["0"] in data:
        break
data=data[:-1]
data_i=[]
def a():
    
for i in data:
    data_i.append(list(map(lambda i:int(i),i)))
for i in data_i:
    if len(i)==1:
        pass
    else:
        print(statistics.pstdev(i))

Submission status: Runtime Error

Solution code:
while True:

    num = int(input())

    if num == 0:
        break
    
    scores = input().split()
    
    for i in range(num):
        scores[i] = float(scores[i])

    avr = sum(scores) / num
    
    daviation = 0
    
    for a in scores:
        disp = (a - avr)**2/num
        daviation += disp
        p

    print(round(math.sqrt(daviation),8))

Submission status: Runtime Error

Solution code:
open(0)

while True:


    
    num = int(input())

    if num == 0:
        break
    
    scores = input().split()
    
    for i in range(num):
        scores[i] = float(scores[i])

    avr = sum(scores) / num
    
    daviation = 0
    
    for a in scores:
        disp = (a - avr)**2/num
        daviation += disp
        p

    print(round(math.sqrt(daviation),8))

Submission status: Runtime Error

Solution code:
f = open(0).read()

while True:


    
    num = int(input())

    if num == 0:
        break
    
    scores = input().split()
    
    for i in range(num):
        scores[i] = float(scores[i])

    avr = sum(scores) / num
    
    daviation = 0
    
    for a in scores:
        disp = (a - avr)**2/num
        daviation += disp
        p

    print(round(math.sqrt(daviation),8))

Submission status: Runtime Error

Solution code:
daviations = []

while True:
    
    num = int(input())

    if num == 0:
        break
    
    scores = input().split()
    
    for i in range(num):
        scores[i] = float(scores[i])

    avr = sum(scores) / num
    
    daviation = 0
    
    for a in scores:
        disp = (a - avr)**2/num
        daviation += disp
        
        
        
    daviations.append(round(math.sqrt(daviation),8))
    
for b in daviations:
        print(b)

Submission status: Runtime Error

Solution code:
import statistics

a=int(input())
while True:
	if a==0:
		break
	else:
	num=list(map(int,input().split()))
	print(statistics.pstdev(num))

Submission status: Runtime Error

Solution code:
import statistics

a=int(input())
while True:
	if a==0:
		break
	else:
		num=list(map(int,input().split()))
		print(statistics.pstdev(num))

Submission status: Runtime Error

Solution code:
#coding: UTF-8
import statistics as st

while True:
    N = int(input())
    if N = 0:
        break
    buf = list(map(float, input().split()))
    sd = st.pstdev(buf)
    print("%.8f"%sd)

Submission status: Runtime Error

Solution code:
from statistics import stdev
while 1:
    num = int(input())
    if num == 0:
        break
    else:
        data = list(map(int, input().split()))
        print(data)
        st = stdev(data)
        print(st)

Submission status: Runtime Error

Solution code:
from statistics *
while True:
    n = int(input())
    if(n == 0): break
    data = list(map(int,input().split()))
    print(stdev(data))

Submission status: Runtime Error

Solution code:
from statistics import *
while True:
    n = int(input())
    if(n == 0): break
    data = list(map(int,input().split()))
    print(stdev(data))

Submission status: Runtime Error

Solution code:
from statistics import *
while True:
    n = int(input())
    if(n == 0): break
    elif(n == 1):
        print("%.10f" %0)
    else:
        data = list(map(int,input().split()))
        print(stdev(data))

Submission status: Runtime Error

Solution code:
from statistics import *
while True:
    n = int(input())
    if(n == 0): break
    elif(n == 1):
        print("%.10f" %0)
    elif(n > 1):
        data = list(map(int,input().split()))
        print(stdev(data))

Submission status: Runtime Error

Solution code:
from statistics import *
while True:
    n = int(input())
    if(n == 0): break
    data = list(map(int,input().split()))    
    elif(n == 1):
        print("%.10f" %0)
    else:
        print(stdev(data))

Submission status: Runtime Error

Solution code:
from statistics import *
while True:
    n = int(input())
    data = list(map(int,input().split()))  
    if(n == 0): break
    elif(n == 1):
        print("%.10f" %0)
    else:
        print(stdev(data))

Submission status: Runtime Error

Solution code:
from math import *
while True:
    n = int(input())
    data = list(map(int,input().split()))  
    a = sum(data) / n
    for i in data:
        b += pow(i-a,2)
    c = sqrt(b/2)
    
    print(c)

Submission status: Runtime Error

Solution code:
from math import *
while True:
    n = int(input())
    data = list(map(int,input().split()))  
    a = sum(data) / n
    b = 0
    c = 0
    for i in data:
        b += pow(i-a,2)
    c = sqrt(b/2)
    
    print(c)

Submission status: Runtime Error

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    s = list(map(int, input().split()))
    
    ave = sum(s) / n
    dev = math.sqrt(sum((ave - si) ** 2 for si in s) / n)

    print(dev)

Submission status: Runtime Error

Solution code:
import statistics

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

Submission status: Runtime Error

Solution code:
import numpy as np

Submission status: Runtime Error

Solution code:
import numpy as np
import math
while True:
    n=input()
    if n==0: break
    s=map(int,raw_input().split())
    var=np.var(s)
    print math.sqrt(var)

Submission status: Runtime Error

Solution code:
import statistics
while True:
  input()
  print(statistics.stdev(map(int, input().split()))

Submission status: Runtime Error

Solution code:
import statistics
while True:
  n = input()
  if n == '0': break
  print(statistics.stdev(map(int, input().split())))

Submission status: Runtime Error

Solution code:
import math

while True:
    n = int(input())
    if n == 0:
        break
    sn = [int(s) for s in input().split()]
    m = sum(sn) / n
    a2 = 0.0
    for s in sn:
        a2 += pow(s-m, 2)
    print(math.sqrt(a2/n)

Submission status: Runtime Error

Solution code:
import math

n = input()
while n != 0:
    if n == 0:
        break
    tmp = map(float, raw_input().split())
    sum = 0
    for i in xrange(len(tmp)):
        sum += tmp[i]
    ave = sum / n
    u = 0
    for i in xrange(n):
        u += (tmp[i] - ave)**2
    u = u / n
    print "%.8f" % math.sqrt(u)
    n = input()
~

Submission status: Runtime Error

Solution code:
import math

while True:
	cnt = int(input())
	li = list(map(int, input().split()))
	
	if cnt == 0:
		break
	
	ave = sum(li) / cnt
	n_var = 0.0
	for i in range(cnt):
		n_var += ( li[i] - ave )**2
		
	var = n_var / cnt
	#print(n_var)
	print('{0:.8f}'.format(math.sqrt(var)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
5
70 80 100 90 20
3
80 80 80
0

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import statistics
while 0!=int(input()):
	s = list(map(int, input().split()))
	print(statistics.stdev(s))

Submission status: Runtime Error

Solution code:
import statistics
while 0!=int(input()):
	s = list(map(int, input().split()))
	print(stdev(s))

Submission status: Runtime Error

Solution code:
import math
while True:
	n = int(input())
	if n==0: break
	s = list(map(float, raw_input().split()))
	t = sum(s)
	a = t / n
	b = sum(map(lambda x: (x-a)**2, s))
	print(math.sqrt(b/n))

Submission status: Runtime Error

Solution code:
import math

while True:
    n = input()
    score = list(map(float, input().split()))
    
    if n == "0":
        break
    else:
        m = sum(score)/len(score)
        for i in range(len(score)):
            score[i] = (score[i]-m)**2
    answer = math.sqrt(sum(score)/len(socre))
    print(answer)

Submission status: Runtime Error

Solution code:
import math

while True:
    n = input()
    
    if n == "0":
        break
    else:
        score = list(map(float, input().split()))
        m = sum(score)/len(score)
        for i in range(len(score)):
            score[i] = (score[i]-m)**2
    answer = math.sqrt(sum(score)/len(socre))
    print(answer)

Submission status: Runtime Error

Solution code:
import math

while True:
    n = input()
    if n == 0:
        break
    m = map(float,raw_input().split())
    print "5f" %(math.sqrt(sum([(m[i]-(sum(m)/len(m)))**2 for i in range(n)])/n))

Submission status: Runtime Error

Solution code:
import math
while n != 0
 n = int(input())
 if n == 0:
  break
 else:
  s = list(map(int, input().split()))
  m = 0
  for i in range(n):
   m += s[i]
  si2 = 0
  for i in range(n):
   si2 += (s[i] - m)**2
  print(math.sqrt(si2))

Submission status: Runtime Error

Solution code:
import math
while n != 0:
 n = int(input())
 if n == 0:
  break
 else:
  s = list(map(int, input().split()))
  m = 0
  for i in range(n):
   m += s[i]
  si2 = 0
  for i in range(n):
   si2 += (s[i] - m)**2
  print(math.sqrt(si2))

Submission status: Runtime Error

Solution code:
import statistics
data=[]
while True:
    n=eval(input())
    if n==0:break
    data.append(list(map(int,input().split())))
Data=iter(data)
for i in Data:
    print(statistics.stdev(i))

Submission status: Runtime Error

Solution code:
from math import *
while True:
    n = int(raw_input())
    if n == 0 :
        break
    for i in range(n):
        sco = map(int,raw_input().split())
        ave=0.0
        for i in sco:
            ave += i
        ave /= n

        dev = 0.0
        for i in sco:
            dev += (i-ave)*(i-ave)
        dev /= n

        print sqrt(dev)

Submission status: Runtime Error

Solution code:
from math import *
while :
    n = int(raw_input())
    if n == 0:
        break
    for i in range(n):
        sco = map(int,raw_input().split())
        ave=0.0
        for i in sco:
            ave += i
        ave /= n

        dev = 0.0
        for i in sco:
            dev += (i-ave)*(i-ave)
        dev /= n

        print sqrt(dev)

Submission status: Runtime Error

Solution code:
from math import *
while True:
    n = int(raw_input())
    if n == 0:
        break
    for i in range(n):
        sco = map(int,raw_input().split())
        ave=0.0
        for i in sco:
            ave += i
        ave /= n

        dev = 0.0
        for i in sco:
            dev += (i-ave)*(i-ave)
        dev /= n

        print sqrt(dev)

Submission status: Runtime Error

Solution code:
from math import *
while True:
    n = int(input())
    if n == 0:
        break
    for i in range(n):
        sco = map(int,raw_input().split())
        ave=0.0
        for i in sco:
            ave += i
        ave /= n

        dev = 0.0
        for i in sco:
            dev += (i-ave)*(i-ave)
        dev /= n

        print sqrt(dev)

Submission status: Runtime Error

Solution code:
while True:
    a_2 = 0
	n = int(input())
	if n == 0
		break
	
	score = [int(x) for x in input().split()]
	m = some(score)/len(score)

	for i in range(len(score)):
		a += (score[i]-m)*(score[i]-m)/n
	
	print('%.4f', a)

Submission status: Runtime Error

Solution code:
scores = []
while True:
    n = int(input())
    if n == 0:
        break
    l = list(map(int, input().split()))
    scores.append(l)

for score in scores:
    print(pstdev(score))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import numpy
"""
Created on Thu Apr 27 00:53:51 2017

@author:
"""
"""
?¨??????????

n ????????????????????????????????§????????°???????????°???????¨?????????£??????????????????????????????s1, s2 ... sn??¨????????¨??????????¨??????????????±???????????????°????????????????????????

??????????????????????????¨????????°????????£?±2?????\???????????§???????????????

?±2 = (???ni=1(si - m)2)/n

?????£?????£????????????????¨???????????±??¨?????????

Input
?????°??????????????????????????\?????¨??????????????????????????????????????????????????\????????¢?????§??????????????????

???????????° n
s1 s2 ... sn
n ??? 0 ?????¨?????\?????????????????¨?????????

Output
?????????????????????????????????????¨?????????????????????????????????????????????????0.0001??\????????????????????£???????????????

Constraints
??\?????§??????????????? n ???1000????¶????????????¨????????????
0 ??? si ??? 100
"""
while(True):
    n=input()
    
    if n=="0":
        break
    else:
        score=list(map(float,input().split()))
        print(numpy.std(score))

Submission status: Runtime Error

Solution code:
while(True):
    n=input()
    
    if n=="0":
        break
    else:
        score=list(map(float,input().split()))
        print(numpy.std(score))

Submission status: Runtime Error

Solution code:
import numpy
while(True):
    n=input()
    
    if n=="0":
        break
    else:
        score=list(map(float,input().split()))
        print(numpy.std(score))