• + 0 comments
    #python
    from statistics import pstdev, mean
    n=int(input())
    X=list(map(float, input().split()))
    Y=list(map(float, input().split()))
    res=[(X[i]-mean(X))*(Y[i]-mean(Y)) for i in range(n)]
    p=sum(res)/(n*pstdev(X)*pstdev(Y))
    print(round(p, 3))