Skip to content

Commit

Permalink
修复高维选项选到低的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ok-oldking committed Jul 7, 2024
1 parent ae3ea66 commit 28436d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions task/NewManXunTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,10 @@ def target_index_array(lst):


def remove_non_digits_and_convert(s):
# Use regular expression to remove non-digit characters
clean_string = re.sub(r'\D', '', s)
# Convert the cleaned string to an integer
return int(clean_string)
# Use regular expression to keep only digits and '+' characters
clean_string = re.sub(r'[^0-9+]', '', s)
# Evaluate the cleaned string as a mathematical expression
return eval(clean_string)


gray_percent_per_line = 0.03660270078 * 100
Expand Down

0 comments on commit 28436d9

Please sign in to comment.