Вот код на Python:
import re
pattern = r"(-?\d+)"
numbers = input("Введите числа: ")
numbers = re.findall(pattern, numbers)
numbers = list(map(int, numbers))
frequents = []
for num in numbers:
if num % 2 == 0:
frequents.append(num)
if len(frequents):
print(min(frequents))
else:
print('совпадений не найдено')
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Вот код на Python:
import re
pattern = r"(-?\d+)"
numbers = input("Введите числа: ")
numbers = re.findall(pattern, numbers)
numbers = list(map(int, numbers))
frequents = []
for num in numbers:
if num % 2 == 0:
frequents.append(num)
if len(frequents):
print(min(frequents))
else:
print('совпадений не найдено')