結果

問題 No.3066 Collecting Coins Speedrun 1
ユーザー moon17
提出日時 2025-03-22 20:31:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 144 bytes
コンパイル時間 372 ms
コンパイル使用メモリ 82,032 KB
実行使用メモリ 84,768 KB
最終ジャッジ日時 2025-03-22 20:31:51
合計ジャッジ時間 3,504 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

n,*c=map(int,open(0).read().split())
if c[0]*c[-1]<0:
  ans=2*(c[-1]-c[0])
else:
  if c[0]>0:
    ans=c[-1]*2
  else:
    ans=-c[0]*2
print(ans)
0