title: Count Obtuse Angles Circle K Equidistant Points 2 Given Points
signature: function countObtuseAnglesCircleKEquidistantPoints2GivenPoints(a: number, b: number, k: number): number {
source_py: def count_obtuse_angles_circle_k_equidistant_points_2_given_points(a, b, k):
      c1 = ((b - a) - 1)
      c2 = ((k - b) + (a - 1))
      if (c1 == c2):
          return 0
      return min(c1, c2)
source_cpp: int count_obtuse_angles_circle_k_equidistant_points_2_given_points(int a, int b, int k) {
    int c1 = ( b - a ) - 1;
    int c2 = ( k - b ) + ( a - 1 );
    if ( c1 == c2 ) return 0;
    return min ( c1, c2 );
  }
question_info.test_list: [{"idx": 0, "outputs": 14, "inputs": {"a": 83, "b": 98, "k": 86}}, {"idx": 1, "outputs": 35, "inputs": {"a": 3, "b": 39, "k": 87}}, {"idx": 2, "outputs": -56, "inputs": {"a": 11, "b": 96, "k": 30}}, {"idx": 3, "outputs": 16, "inputs": {"a": 50, "b": 67, "k": 48}}, {"idx": 4, "outputs": -25, "inputs": {"a": 40, "b": 16, "k": 32}}, {"idx": 5, "outputs": 23, "inputs": {"a": 62, "b": 86, "k": 76}}, {"idx": 6, "outputs": 32, "inputs": {"a": 40, "b": 78, "k": 71}}, {"idx": 7, "outputs": -56, "inputs": {"a": 66, "b": 11, "k": 74}}, {"idx": 8, "outputs": 2, "inputs": {"a": 6, "b": 9, "k": 19}}, {"idx": 9, "outputs": -21, "inputs": {"a": 25, "b": 5, "k": 5}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(a: number, b: number, k: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b, k),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(83, 98, 86, 14);
    console.log(`TEST-0...${result}`);
  
    result = driver(3, 39, 87, 35);
    console.log(`TEST-1...${result}`);
  
    result = driver(11, 96, 30, -56);
    console.log(`TEST-2...${result}`);
  
    result = driver(50, 67, 48, 16);
    console.log(`TEST-3...${result}`);
  
    result = driver(40, 16, 32, -25);
    console.log(`TEST-4...${result}`);
  
    result = driver(62, 86, 76, 23);
    console.log(`TEST-5...${result}`);
  
    result = driver(40, 78, 71, 32);
    console.log(`TEST-6...${result}`);
  
    result = driver(66, 11, 74, -56);
    console.log(`TEST-7...${result}`);
  
    result = driver(6, 9, 19, 2);
    console.log(`TEST-8...${result}`);
  
    result = driver(25, 5, 5, -21);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: countObtuseAnglesCircleKEquidistantPoints2GivenPoints
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js