結果

問題 No.3066 Collecting Coins Speedrun 1
ユーザー 回転
提出日時 2025-05-22 01:52:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 957 ms
コンパイル使用メモリ 82,248 KB
実行使用メモリ 82,576 KB
最終ジャッジ日時 2025-05-22 01:52:36
合計ジャッジ時間 3,861 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
C = list(map(int,input().split()))

if(C[0] <= 0 <= C[-1]):
    print(abs(2*C[0]) + abs(2*C[-1]))
elif(C[0] > 0):
    print(C[-1]*2)
else:
    print(C[0] * (-2))
0