結果

問題 No.3066 Collecting Coins Speedrun 1
コンテスト
ユーザー Hyoka7
提出日時 2025-03-21 21:48:17
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 327 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,124 ms
コンパイル使用メモリ 95,324 KB
実行使用メモリ 103,548 KB
最終ジャッジ日時 2026-07-07 14:40:27
合計ジャッジ時間 4,578 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def readlist():
    return list(map(int, input().split()))


def readint():
    return map(int, input().split())


n = int(input())
coord = readlist()
plus, minus = [0], [0]
for x in coord:
    if x > 0:
        plus.append(x)
    elif x < 0:
        minus.append(x)
plus.sort()
minus.sort()
print(plus[-1] * 2 - minus[0] * 2)
0