[READ-ONLY] Mirror of https://github.com/shuuji3/competitive-programming. 馃洬 Codes submitted to competitive programming platforms
aizu-online-jadge aoj atcoder hackerrank leetcode
0

Configure Feed

Select the types of activity you want to include in your feed.

1import math 2 3n = int(input()) 4x = list(map(int, input().split())) 5y = list(map(int, input().split())) 6 7print(sum(map(lambda v: math.fabs(v[0] - v[1]), zip(x, y)))) 8print(sum(map(lambda v: math.fabs((v[0] - v[1]) ** 2), zip(x, y))) ** (1/2)) 9print(sum(map(lambda v: math.fabs((v[0] - v[1]) ** 3), zip(x, y))) ** (1/3)) 10print(max(map(lambda v: math.fabs(v[0] - v[1]), zip(x, y))))