title: Number Jump Required Given Length Reach Point Form D 0 Origin 2D Plane
signature: function number_jump_required_given_length_reach_point_form_d_0_origin_2d_plane(a, b, d)
test_code: 
  
  -- SOLUTION CODE
  -- ============================================
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  function isCorrect(actual, expected)
      if type(expected) ~= type(actual) then
          return false
      end
      
      if type(expected) == 'table' then
          for k,v_expected in pairs(expected) do
              
              if actual[k] == nil then
                  return false
              end
              local v_actual = actual[k]
              if not isCorrect(v_actual, v_expected) then
                  return false
              end
              actual[k]=nil
          end
      
          if next(actual) then 
              return false
          end
          return true
      else
          return actual == expected
      end
  end
  
  function validateSolution(actual, expected)
      return math.abs(actual - expected) < 1e-09
  end
  
  function driver(a, b, d, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(a, b, d) 
      end)
      if status then
          if validateSolution(exec_result,expected) then
              return "PASSED"
          end
          return "FAILED"
      else
          return string.format("ERROR=%s",string.gsub(error_msg,".*:[%d]+: ",""))
      end
  end
      
  function main()
      result = driver(35, 8, 77, 3.1714285714285713)
      print(string.format("TEST-0...%s",result))
  
      result = driver(85, 55, 33, 2.0)
      print(string.format("TEST-1...%s",result))
  
      result = driver(22, 23, 64, 3.739130434782609)
      print(string.format("TEST-2...%s",result))
  
      result = driver(8, 43, 29, 2.0)
      print(string.format("TEST-3...%s",result))
  
      result = driver(12, 64, 11, 2.0)
      print(string.format("TEST-4...%s",result))
  
      result = driver(58, 25, 26, 2.0)
      print(string.format("TEST-5...%s",result))
  
      result = driver(65, 4, 28, 2.0)
      print(string.format("TEST-6...%s",result))
  
      result = driver(10, 95, 55, 2.0)
      print(string.format("TEST-7...%s",result))
  
      result = driver(23, 13, 54, 3.3043478260869565)
      print(string.format("TEST-8...%s",result))
  
      result = driver(5, 50, 71, 2.4)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
source_py: def number_jump_required_given_length_reach_point_form_d_0_origin_2d_plane(a, b, d):
      temp = a
      a = min(a, b)
      b = max(temp, b)
      if (d >= b):
          return (((d + b) - 1) / b)
      if (d == 0):
          return 0
      if (d == a):
          return 1
      return 2
source_cpp: int number_jump_required_given_length_reach_point_form_d_0_origin_2d_plane(int a, int b, int d) {
    int temp = a;
    a = min ( a, b );
    b = max ( temp, b );
    if ( d >= b ) return ( d + b - 1 ) / b;
    if ( d == 0 ) return 0;
    if ( d == a ) return 1;
    return 2;
  }