結果
| 問題 | No.1374 Absolute Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-18 12:57:59 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| コード長 | 174 bytes |
| 記録 | |
| コンパイル時間 | 286 ms |
| コンパイル使用メモリ | 82,576 KB |
| 実行使用メモリ | 88,520 KB |
| 最終ジャッジ日時 | 2024-06-22 04:13:48 |
| 合計ジャッジ時間 | 3,432 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
ソースコード
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)))