結果

問題 No.2315 Flying Camera
ユーザー miho-4miho-4
提出日時 2023-05-26 21:24:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 442 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 1,432 ms
コンパイル使用メモリ 86,592 KB
実行使用メモリ 76,464 KB
最終ジャッジ日時 2023-08-26 09:57:15
合計ジャッジ時間 8,440 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
76,240 KB
testcase_01 AC 82 ms
76,136 KB
testcase_02 AC 87 ms
76,260 KB
testcase_03 AC 278 ms
76,364 KB
testcase_04 AC 373 ms
76,252 KB
testcase_05 AC 317 ms
76,252 KB
testcase_06 AC 203 ms
76,340 KB
testcase_07 AC 372 ms
76,064 KB
testcase_08 AC 181 ms
76,412 KB
testcase_09 AC 103 ms
76,100 KB
testcase_10 AC 182 ms
76,184 KB
testcase_11 AC 387 ms
76,184 KB
testcase_12 AC 127 ms
76,188 KB
testcase_13 AC 99 ms
76,352 KB
testcase_14 AC 393 ms
76,192 KB
testcase_15 AC 293 ms
76,224 KB
testcase_16 AC 251 ms
76,256 KB
testcase_17 AC 173 ms
76,304 KB
testcase_18 AC 388 ms
76,380 KB
testcase_19 AC 310 ms
76,456 KB
testcase_20 AC 145 ms
76,436 KB
testcase_21 AC 211 ms
76,452 KB
testcase_22 AC 137 ms
75,948 KB
testcase_23 AC 79 ms
76,244 KB
testcase_24 AC 442 ms
76,416 KB
testcase_25 AC 83 ms
76,464 KB
testcase_26 AC 397 ms
76,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
L=[list(map(int,input().split())) for _ in range(n)]
ans=10**9
for i in range(1,301):
  for j in range(1,301):
    tmp=0
    for x,y in L:
      tmp+=abs(x-i)+abs(y-j)
    ans=min(ans,tmp)
print(ans)
0