結果
| 問題 | No.3066 Collecting Coins Speedrun 1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:48:17 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 74 ms / 2,000 ms |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 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 |
ソースコード
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)