Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. s = input()
  2. a = int(s.split('x')[0])
  3. b = int(s.split('+')[1].split('=')[0])
  4. if a == 0 and b != 0:
  5. print('no solutions')
  6. elif b == 0:
  7. print('0')
  8. elif b != 0 and ((-b / a) != 0):
  9. print(int(-b / a))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement