結果
| 問題 |
No.3103 Butterfly Effect
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-16 15:30:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 399 bytes |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 82,288 KB |
| 実行使用メモリ | 66,984 KB |
| 最終ジャッジ日時 | 2025-04-16 15:35:17 |
| 合計ジャッジ時間 | 6,935 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / 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)
lam6er