Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- list1 = []
- list2 = []
- while n != 0:
- if n % 3 == 0 and n % 2 == 0:
- list1.append(n)
- elif n % 7 == 0 and n % 2 != 0:
- list2.append(n)
- n = int(input())
- odd_index_sum = 0
- for index, digit in enumerate(list1):
- if index % 2 != 0:
- odd_index_sum += digit
- list2.sort(reverse=True)
- min_num = min(list2)
- max_num = max(list2)
- prod = max_num * min_num
- print(list1)
- print(list2)
- print(odd_index_sum)
- print(prod)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement