Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #f_in = open('connect.in', 'r')
- #f_out = open('connect.out', 'w')
- a, b = map(int, input().split())
- A = []
- count = 0
- if a + b not in A:
- A.append(a + b)
- count += 1
- if a - b not in A:
- A.append(a - b)
- count += 1
- if b - a not in A:
- A.append(b - a)
- count += 1
- if a * b not in A:
- A.append(a * b)
- count += 1
- if b != 0 and a / b not in A:
- A.append(a / b)
- count += 1
- if a != 0 and b / a not in A:
- A.append(b / a)
- count += 1
- if a != 0 or b > 0:
- if a**b not in A:
- A.append(a**b)
- count += 1
- if b != 0 or a > 0:
- if b**a not in A:
- count += 1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement