提出 #75185316


ソースコード 拡げる

import math
n = int(input())
lis = []
for _ in range(n):
    lis.append(list(map(int, input().split())))
lis.append([0,0])
s = [0,0]
ans = float(0)
for i, j in lis:
    ans += math.sqrt((i-s[0])**2 + (j-s[1])**2)
    s = [i,j]

print(ans)
        

提出情報

提出日時
問題 C - Traveling Takahashi Problem
ユーザ Eurekaaa11
言語 Python (PyPy 3.11-v7.3.20)
得点 150
コード長 260 Byte
結果 AC
実行時間 325 ms
メモリ 137456 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 150 / 150
結果
AC × 3
AC × 14
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
random_01.txt AC 293 ms 137456 KiB
random_02.txt AC 185 ms 122288 KiB
random_03.txt AC 291 ms 137252 KiB
random_04.txt AC 129 ms 113684 KiB
random_05.txt AC 300 ms 136580 KiB
random_06.txt AC 118 ms 112476 KiB
random_07.txt AC 323 ms 136612 KiB
random_08.txt AC 91 ms 109928 KiB
random_09.txt AC 57 ms 80204 KiB
random_10.txt AC 57 ms 79796 KiB
random_11.txt AC 325 ms 136404 KiB
sample_01.txt AC 57 ms 80268 KiB
sample_02.txt AC 57 ms 80040 KiB
sample_03.txt AC 56 ms 79952 KiB