結果
| 問題 | No.3066 Collecting Coins Speedrun 1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-28 14:53:48 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 252 bytes |
| 記録 | |
| コンパイル時間 | 377 ms |
| コンパイル使用メモリ | 82,976 KB |
| 実行使用メモリ | 72,984 KB |
| 最終ジャッジ日時 | 2025-12-28 14:53:53 |
| 合計ジャッジ時間 | 5,133 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 32 |
ソースコード
t=int(input())
for _ in range(t):
n=int(input())
a=sorted(list(map(int,input().split())))
if a[-1]<0:
print(abs(a[0])*2)
elif a[0]>=0:
print(a[-1]*2)
else:
print((abs(min(a[0],a[-1]))+abs(max(a[0],a[-1])))*2)