input: Write a function to calculate the objective function of a linear equation given by ax + by = c. If the equation cannot be solved or if any of the inputs are invalid, return None.
  assert linear_eq(3, 5, 7)==0
  assert linear_eq(2, 6, 10)==20
  assert linear_eq(1, 1, 2)==0
  assert linear_eq(0, 0, 0)==None
  assert linear_eq(1, 0, 3)==None
output: def linear_eq(a, b, c):
      if a == 0 and b == 0:
          return None
      if a == 0:
          return None
      if b == 0:
          return None
      x = (c - b * (c // b)) / a
      y = (c - a * x) / b
      if a * x + b * y == c:
          return 0
      else:
          return None