import math



n = int(eval(input()))

vector_x = [float(x) for x in input().split(" ")]

vector_y = [float(y) for y in input().split(" ")]



p1 = sum([abs(x - y) for x, y in zip(vector_x, vector_y)])

p2 = sum([abs(x - y) ** 2 for x, y in zip(vector_x, vector_y)]) ** (1/2)

p3 = sum([abs(x - y) ** 3 for x, y in zip(vector_x, vector_y)]) ** (1/3)

t = max([abs(x - y) for x, y in zip(vector_x, vector_y)])



print(("{:.6f}".format(p1)))

print(("{:.6f}".format(p2)))

print(("{:.6f}".format(p3)))

print(("{:.6f}".format(t)))
def get_minkowski_distance(a, b, p):

    """

    get Minkowski's distance

    a : int list

    b : int list

    p : int

    """

    s = 0

    res = 0.0



    if p == 0:

        l = []

        for x, y in zip(a, b):

            l.append(abs(x - y))

        res = max(l) 



    else:

        for x, y in zip(a, b):

            s += abs(x - y) ** p



        res = round((s ** (1/p)), 6)



    return res



if __name__ == "__main__":

    n = int(eval(input()))

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

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



    print((get_minkowski_distance(a, b, 1)))

    print((get_minkowski_distance(a, b, 2)))

    print((get_minkowski_distance(a, b, 3)))

    print((get_minkowski_distance(a, b, 0)))



import math

n = int(eval(input()))
vector_x = [float(x) for x in input().split(" ")]
vector_y = [float(y) for y in input().split(" ")]
p1 = sum([abs(x - y) for x, y in zip(vector_x, vector_y)])
p2 = sum([abs(x - y) ** 2 for x, y in zip(vector_x, vector_y)]) ** (1 / 2)
p3 = sum([abs(x - y) ** 3 for x, y in zip(vector_x, vector_y)]) ** (1 / 3)
t = max([abs(x - y) for x, y in zip(vector_x, vector_y)])
print(("{:.6f}".format(p1)))
print(("{:.6f}".format(p2)))
print(("{:.6f}".format(p3)))
print(("{:.6f}".format(t)))

def get_minkowski_distance(a, b, p):
    """
    get Minkowski's distance
    a : int list
    b : int list
    p : int
    """
    s = 0
    res = 0.0
    if p == 0:
        l = []
        for x, y in zip(a, b):
            l.append(abs(x - y))
        res = max(l)
    else:
        for x, y in zip(a, b):
            s += abs(x - y) ** p
        res = round((s ** (1 / p)), 6)
    return res


if __name__ == "__main__":
    n = int(eval(input()))
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    print((get_minkowski_distance(a, b, 1)))
    print((get_minkowski_distance(a, b, 2)))
    print((get_minkowski_distance(a, b, 3)))
    print((get_minkowski_distance(a, b, 0)))

-import math +def get_minkowski_distance(a, b, p): +    """ +    get Minkowski's distance +    a : int list +    b : int list +    p : int +    """ +    s = 0 +    res = 0.0 +    if p == 0: +        l = [] +        for x, y in zip(a, b): +            l.append(abs(x - y)) +        res = max(l) +    else: +        for x, y in zip(a, b): +            s += abs(x - y) ** p +        res = round((s ** (1 / p)), 6) +    return res -n = int(eval(input())) -vector_x = [float(x) for x in input().split(" ")] -vector_y = [float(y) for y in input().split(" ")] -p1 = sum([abs(x - y) for x, y in zip(vector_x, vector_y)]) -p2 = sum([abs(x - y) ** 2 for x, y in zip(vector_x, vector_y)]) ** (1 / 2) -p3 = sum([abs(x - y) ** 3 for x, y in zip(vector_x, vector_y)]) ** (1 / 3) -t = max([abs(x - y) for x, y in zip(vector_x, vector_y)]) -print(("{:.6f}".format(p1))) -print(("{:.6f}".format(p2))) -print(("{:.6f}".format(p3))) -print(("{:.6f}".format(t))) + +if __name__ == "__main__": +    n = int(eval(input())) +    a = list(map(int, input().split())) +    b = list(map(int, input().split())) +    print((get_minkowski_distance(a, b, 1))) +    print((get_minkowski_distance(a, b, 2))) +    print((get_minkowski_distance(a, b, 3))) +    print((get_minkowski_distance(a, b, 0)))