Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = int(input())
zahyo =[list(map(int,input().split())) for _ in range(N)]
N_list = [i for i in range(N)]
P = itertools.permutations(N_list,N)
P = list(P)
L = []
for p in P:
    for i,j in zip(p,p[1:]):
        xi,yi = zahyo[i]
        xj,yj = zahyo[j]
        L.append(((xi-xj)**2+(yi-yj)**2)**0.5)
    Lsum = sum(L)
print(Lsum/len(P))

Fixed submission:
import itertools
N = int(input())
zahyo =[list(map(int,input().split())) for _ in range(N)]
N_list = [i for i in range(N)]
P = itertools.permutations(N_list,N)
P = list(P)
sm = 0
for p in P:
    for i,j in zip(p,p[1:]):
        xi,yi = zahyo[i]
        xj,yj = zahyo[j]
        sm += (((xi-xj)**2+(yi-yj)**2)**0.5)
print(sm/len(P))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = int(input())
zahyo =[list(map(int,input().split())) for _ in range(N)]
N_list = [i for i in range(N)]
P = itertools.permutations(N_list,N)
P = list(P)
L = []
for i in range(len(P)):
    for j in range(N-1):
        I = P[i][j]
        J = P[i][j+1]
        xi = zahyo[I][0]
        xj = zahyo[J][0]
        yi = zahyo[I][1]
        yj = zahyo[J][1]
        L.append(((xi-xj)**2+(yi-yj)**2)**0.5)
    Lsum = sum(L)
print(Lsum/len(P))

Fixed submission:
import itertools
N = int(input())
zahyo =[list(map(int,input().split())) for _ in range(N)]
N_list = [i for i in range(N)]
P = itertools.permutations(N_list,N)
P = list(P)
sm = 0
for p in P:
    for i,j in zip(p,p[1:]):
        xi,yi = zahyo[i]
        xj,yj = zahyo[j]
        sm += (((xi-xj)**2+(yi-yj)**2)**0.5)
print(sm/len(P))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = int(input())
zahyo =[list(map(int,input().split())) for _ in range(N)]
N_list = [i for i in range(N)]
P = itertools.permutations(N_list,N)
P = list(P)
L = []
for i in range(len(P)):
    for j in range(N-1):
        I = P[i][j]
        J = P[i][j+1]
        xi = zahyo[I][0]
        xj = zahyo[J][0]
        yi = zahyo[I][1]
        yj = zahyo[J][1]
        L.append(((xi-xj)**2+(yi-yj)**2)**0.5)
    Lsum = sum(L)
print(Lsum/len(P))

Fixed submission:
import itertools
N = int(input())
zahyo =[list(map(int,input().split())) for _ in range(N)]
N_list = [i for i in range(N)]
P = itertools.permutations(N_list,N)
P = list(P)
sm = 0
for p in P:
    for i,j in zip(p,p[1:]):
        xi,yi = zahyo[i]
        xj,yj = zahyo[j]
        sm += (((xi-xj)**2+(yi-yj)**2)**0.5)
print(sm/len(P))

Buggy python submission (verdict: Runtime Error):
import math
import itertools
from decimal import Decimal
N = int(input())
z = []
A = []
for i in range(N):
  xy = list(map(int,input().split()))
  z.append(xy)
for j in range(N):
  for k in range(j+1,N):
    A.append(Decimal(math.sqrt((z[j][0]-z[k][0])**2+(z[j][1]-z[k][1])**2)))
B = list(itertools.permutations(A, 2))
for l in range(math.factorial(N)):
  B[l] = sum(B[l])
print(sum(B)/math.factorial(N))

Fixed submission:
import itertools
N = int(input())
zahyo =[list(map(int,input().split())) for _ in range(N)]
N_list = [i for i in range(N)]
P = itertools.permutations(N_list,N)
P = list(P)
sm = 0
for p in P:
    for i,j in zip(p,p[1:]):
        xi,yi = zahyo[i]
        xj,yj = zahyo[j]
        sm += (((xi-xj)**2+(yi-yj)**2)**0.5)
print(sm/len(P))