結果

問題 No.1374 Absolute Game
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-06-18 12:57:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 1,220 ms
コンパイル使用メモリ 85,860 KB
実行使用メモリ 93,548 KB
最終ジャッジ日時 2023-09-04 04:43:40
合計ジャッジ時間 5,011 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
70,684 KB
testcase_01 AC 74 ms
70,760 KB
testcase_02 AC 73 ms
70,860 KB
testcase_03 AC 76 ms
70,908 KB
testcase_04 AC 72 ms
70,740 KB
testcase_05 AC 70 ms
70,908 KB
testcase_06 AC 72 ms
70,864 KB
testcase_07 AC 73 ms
70,852 KB
testcase_08 AC 92 ms
78,600 KB
testcase_09 AC 107 ms
88,344 KB
testcase_10 AC 111 ms
90,488 KB
testcase_11 AC 97 ms
84,020 KB
testcase_12 AC 88 ms
78,704 KB
testcase_13 AC 106 ms
86,564 KB
testcase_14 AC 117 ms
92,688 KB
testcase_15 AC 119 ms
93,548 KB
testcase_16 AC 118 ms
92,468 KB
testcase_17 AC 121 ms
93,184 KB
testcase_18 AC 115 ms
92,992 KB
testcase_19 AC 119 ms
93,544 KB
testcase_20 AC 94 ms
80,600 KB
testcase_21 AC 98 ms
83,032 KB
testcase_22 AC 116 ms
93,180 KB
testcase_23 AC 82 ms
75,232 KB
testcase_24 AC 87 ms
75,556 KB
testcase_25 AC 84 ms
76,160 KB
testcase_26 AC 90 ms
78,700 KB
testcase_27 AC 94 ms
82,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
c=list(map(int,input().split()))
if sum(c)<0:
  c=[-x for x in c]
c.sort()
a=sum([x for x in c[0:n:2]])
b=sum([x for x in c[1:n:2]])

print(abs(abs(a)-abs(b)))
0