python實現
num=int(input()) s=input() sum=0.0 for i in range(num): f=1.0/float(s.split(" ")[i]) sum+=f sum=1.0/(sum/float(num)) print("{:.2f}".format(sum))
python實現
num=int(input()) s=input() sum=0.0 for i in range(num): f=1.0/float(s.split(" ")[i]) sum+=f sum=1.0/(sum/float(num)) print("{:.2f}".format(sum))