from random import randint
count = 0
right_nums = []
nums = [randint(-10, 10) for i in range(15)]
for i in range(len(nums)):
if sum(nums) < nums[i]:
count += 1
right_nums.append(i)
print(count)
print(' '.join(map(str, right_nums)))
Объяснение:
from random import randint
count = 0
right_nums = []
nums = [randint(-10, 10) for i in range(15)]
for i in range(len(nums)):
if sum(nums) < nums[i]:
count += 1
right_nums.append(i)
print(count)
print(' '.join(map(str, right_nums)))
Объяснение: