title: Number Jump Required Given Length Reach Point Form D 0 Origin 2D Plane
signature: class Solution {
  
      public decimal NumberJumpRequiredGivenLengthReachPointFormD0Origin2DPlane(int a, int b, int d) {
test_code: using System;
  using System.Numerics;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Security.Cryptography;
  using System.Web.UI;
  using System.Web.Script.Serialization;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  namespace EvaluatePrediction {
      class TestRunner {
          public bool ValidateSolution(decimal actual, decimal expected){
              return Math.Abs(actual - expected) < 1e-09m;
          }
  
          public string driver(int a, int b, int d, decimal expected){
              try{
                PLACEHOLDER_CLS_NAME solution_cls = new PLACEHOLDER_CLS_NAME();
                decimal pred_result = solution_cls.PLACEHOLDER_FN_NAME(a, b, d); 
                if (ValidateSolution(
                      pred_result,
                      expected)){
                  return "PASSED";
                }
                return "FAILED";
              } 
              catch (Exception exception_obj)
              {
                return exception_obj.GetType().FullName;
              }
          }
          static void Main(string[] args) {
              TestRunner runner = new TestRunner();
              String result;
              result = runner.driver(
                  35, 8, 77, 
                  3.1714285714285713m
              );
              Console.WriteLine(string.Format(
                  "TEST-0...{0}",
                  result)
              );result = runner.driver(
                  85, 55, 33, 
                  2.0m
              );
              Console.WriteLine(string.Format(
                  "TEST-1...{0}",
                  result)
              );result = runner.driver(
                  22, 23, 64, 
                  3.739130434782609m
              );
              Console.WriteLine(string.Format(
                  "TEST-2...{0}",
                  result)
              );result = runner.driver(
                  8, 43, 29, 
                  2.0m
              );
              Console.WriteLine(string.Format(
                  "TEST-3...{0}",
                  result)
              );result = runner.driver(
                  12, 64, 11, 
                  2.0m
              );
              Console.WriteLine(string.Format(
                  "TEST-4...{0}",
                  result)
              );result = runner.driver(
                  58, 25, 26, 
                  2.0m
              );
              Console.WriteLine(string.Format(
                  "TEST-5...{0}",
                  result)
              );result = runner.driver(
                  65, 4, 28, 
                  2.0m
              );
              Console.WriteLine(string.Format(
                  "TEST-6...{0}",
                  result)
              );result = runner.driver(
                  10, 95, 55, 
                  2.0m
              );
              Console.WriteLine(string.Format(
                  "TEST-7...{0}",
                  result)
              );result = runner.driver(
                  23, 13, 54, 
                  3.3043478260869565m
              );
              Console.WriteLine(string.Format(
                  "TEST-8...{0}",
                  result)
              );result = runner.driver(
                  5, 50, 71, 
                  2.4m
              );
              Console.WriteLine(string.Format(
                  "TEST-9...{0}",
                  result)
              );
          }
      }
  }
  
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;
  }