Submission #8471360


Source Code Expand

Copy
import math
import itertools

N, = (int(x) for x in input().split())
xy_arr = []
for _ in range(N):
    x,y = (int(x) for x in input().split())
    xy_arr.append((x,y))

d = 0.0
for (x1,y1),(x2,y2) in itertools.permutations(xy_arr, 2):
    d += math.sqrt((x2-x1)**2+(y2-y1)**2)
d *= 1.0/N

print(d)
    

Submission Info

Submission Time
Task C - Average Length
User tkmtSo
Language Python (3.4.3)
Score 300
Code Size 305 Byte
Status AC
Exec Time 18 ms
Memory 3060 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample00, sample01, sample02
All handmade03, handmade04, handmade05, random06, random07, random08, random09, random10, random11, random12, random13, random14, sample00, sample01, sample02
Case Name Status Exec Time Memory
handmade03 AC 17 ms 3060 KB
handmade04 AC 17 ms 3060 KB
handmade05 AC 17 ms 3060 KB
random06 AC 17 ms 3060 KB
random07 AC 17 ms 3060 KB
random08 AC 17 ms 3060 KB
random09 AC 17 ms 3060 KB
random10 AC 17 ms 3060 KB
random11 AC 17 ms 3060 KB
random12 AC 17 ms 3060 KB
random13 AC 17 ms 3060 KB
random14 AC 17 ms 3060 KB
sample00 AC 17 ms 3060 KB
sample01 AC 18 ms 3060 KB
sample02 AC 17 ms 3060 KB