Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_numbers = list(map(int, input().split(", ")))
- wealth = int(input())
- filtered = []
- for num in input_numbers:
- if num < wealth and (max(input_numbers) + num) >= 2 * wealth:
- index_max = input_numbers.index(max(input_numbers))
- input_numbers[index_max] = max(input_numbers) - (wealth - num)
- num = wealth
- filtered.append(num)
- if len([n for n in filtered if n >= wealth]) == len(input_numbers):
- print(filtered)
- else:
- print("No equal distribution possible")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement