title: Number Jump Required Given Length Reach Point Form D 0 Origin 2D Plane
signature: class Solution {
  
      public Double numberJumpRequiredGivenLengthReachPointFormD0Origin2DPlane(Integer a, Integer b, Integer d) {
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;
  }
question_info.extension: java
question_info.entry_fn_name: numberJumpRequiredGivenLengthReachPointFormD0Origin2DPlane
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 3.1714285714285713, "inputs": {"a": 35, "b": 8, "d": 77}}, {"idx": 1, "outputs": 2, "inputs": {"a": 85, "b": 55, "d": 33}}, {"idx": 2, "outputs": 3.739130434782609, "inputs": {"a": 22, "b": 23, "d": 64}}, {"idx": 3, "outputs": 2, "inputs": {"a": 8, "b": 43, "d": 29}}, {"idx": 4, "outputs": 2, "inputs": {"a": 12, "b": 64, "d": 11}}, {"idx": 5, "outputs": 2, "inputs": {"a": 58, "b": 25, "d": 26}}, {"idx": 6, "outputs": 2, "inputs": {"a": 65, "b": 4, "d": 28}}, {"idx": 7, "outputs": 2, "inputs": {"a": 10, "b": 95, "d": 55}}, {"idx": 8, "outputs": 3.3043478260869565, "inputs": {"a": 23, "b": 13, "d": 54}}, {"idx": 9, "outputs": 2.4, "inputs": {"a": 5, "b": 50, "d": 71}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer a, Integer b, Integer d, Double expected){
          try{
              Driver driver = new Driver();
              if (driver.run(a, b, d,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(35, 8, 77, 3.1714285714285713);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(85, 55, 33, 2.0);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(22, 23, 64, 3.739130434782609);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(8, 43, 29, 2.0);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(12, 64, 11, 2.0);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(58, 25, 26, 2.0);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(65, 4, 28, 2.0);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(10, 95, 55, 2.0);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(23, 13, 54, 3.3043478260869565);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(5, 50, 71, 2.4);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer a, Integer b, Integer d, Double expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(a, b, d),expected);
      }
      
      public boolean validateSolution(Double actual, Double expected){
          return Math.abs(actual - expected) < 1e-09;
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__