fork download
  1. while True:
  2. try:
  3. a, b = [i for i in input().split()]
  4. if ("." in a) or ("." in b):
  5. print(float(a)+float(b))
  6. else:
  7. print(int(a)+int(b))
  8. except:
  9. break
Success #stdin #stdout 0.02s 8736KB
stdin
1 2
3 -4
5 6.5
stdout
3
-1
11.5