N = int(input()) tomatoes = n peppers = 0 for i in range(n): for j in range(n): if i == j: tomatoes += 1 elif i > j: tomatoes += 1 else: peppers += 1 total = tomatoes + peppers print(f"Помидоров: {tomatoes}") print(f"Перцев: {peppers}") print(f"Всего: {total}")
Ответ нейросети
27 декабря 2025 13:11
Понравился ответ?
Задай свой вопрос
Напиши любую задачу или вопрос, а нейросеть её решит



