結果
問題 | No.3066 Collecting Coins Speedrun 1 |
ユーザー |
|
提出日時 | 2025-03-21 21:52:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 317 ms |
コンパイル使用メモリ | 82,708 KB |
実行使用メモリ | 87,116 KB |
最終ジャッジ日時 | 2025-03-21 21:52:33 |
合計ジャッジ時間 | 3,517 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
import sys, time, random from collections import deque, Counter, defaultdict def debug(*x):print('debug:',*x, file=sys.stderr) input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) inf = 2 ** 61 - 1 mod = 998244353 n = ii() a = li() ans = 0 if max(a) > 0: ans += 2 * max(a) if min(a) < 0: ans -= 2 * min(a) print(ans)