Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = []
- for _ in range(int(input())):
- s1, s2 = input().split()
- if s1.isdecimal():
- a.append(int(s1))
- if s2.isdecimal():
- a.append(int(s2))
- if len(a) == 0:
- print("INVALID INPUT")
- else:
- sum = 0
- res = 1
- for i in a:
- sum += i
- res *= i
- print(sum, res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement