Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- instr = sorted(filter(lambda x: x != 0, [int(i) for i in input().split(',')]))
- pos = 1
- neg = 1
- lessneg = 0
- for i in instr:
- if i > 0:
- pos *= i
- else:
- neg *= i
- lessneg = i
- if neg > 0:
- print(pos * neg)
- else:
- print(pos * (neg // lessneg))
- print('f')
Advertisement
Add Comment
Please, Sign In to add comment