結果
| 問題 |
No.3066 Collecting Coins Speedrun 1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:48:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 71 ms / 2,000 ms |
| コード長 | 327 bytes |
| コンパイル時間 | 621 ms |
| コンパイル使用メモリ | 82,888 KB |
| 実行使用メモリ | 91,972 KB |
| 最終ジャッジ日時 | 2025-03-21 21:48:21 |
| 合計ジャッジ時間 | 3,638 ms |
|
ジャッジサーバーID (参考情報) |
judge7 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 |
ソースコード
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)