結果
問題 |
No.3103 Butterfly Effect
|
ユーザー |
![]() |
提出日時 | 2025-04-15 21:34:08 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 399 bytes |
コンパイル時間 | 492 ms |
コンパイル使用メモリ | 81,716 KB |
実行使用メモリ | 66,740 KB |
最終ジャッジ日時 | 2025-04-15 21:36:33 |
合計ジャッジ時間 | 6,664 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 50 |
ソースコード
n = int(input()) a = list(map(int, input().split())) if n == 0: print(0) exit() global_max = max(a) global_min = min(a) sum_ans = 0 abs_global_max = abs(global_max) abs_global_min = abs(global_min) for num in a: if num == global_min: current = max(abs_global_max, abs_global_min) else: current = max(abs_global_max, abs(num)) sum_ans += current print(sum_ans)