mirror of
https://github.com/InternLM/InternBootcamp.git
synced 2026-04-19 12:58:04 +00:00
fix ternary operator in dslime.py (#1)
This commit is contained in:
parent
18a552597a
commit
7b218f8e38
1 changed files with 1 additions and 1 deletions
|
|
@ -189,5 +189,5 @@ Find the maximum possible final value. Put your answer in [answer]...[/answer]."
|
|||
total = sum(a)
|
||||
if any(x < 0 for x in a) ^ any(x >= 0 for x in a):
|
||||
min_val, max_val = min(a), max(a)
|
||||
return solution == (total - 2*min_val) if any(x >=0 for x in a) else (2*max_val - total)
|
||||
return solution == ((total - 2*min_val) if any(x >=0 for x in a) else (2*max_val - total))
|
||||
return solution == sum(abs(x) for x in a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue