結果

問題 No.1906 Twinkle Town
ユーザー googol_S0
提出日時 2022-04-15 21:45:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 177 bytes
コンパイル時間 423 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 119,888 KB
最終ジャッジ日時 2024-12-25 00:22:08
合計ジャッジ時間 10,804 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other WA * 47
権限があれば一括ダウンロードができます

ソースコード

diff #

for t in range(int(input())):
  N=int(input())
  A=[0]+sorted(map(int,input().split()))
  B=[]
  for i in range(N,0,-1):
    B.append(A[i]-A[i-1])
  print(sum(sorted(B)[N>>1:]))
0