title: Count Obtuse Angles Circle K Equidistant Points 2 Given Points
signature: int countObtuseAnglesCircleKEquidistantPoints2GivenPoints(int a, int b, int k) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual == expected;
  }
  
  string driver(int a, int b, int k, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b, k), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(83, 98, 86, 14); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(3, 39, 87, 35); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(11, 96, 30, -56); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver(50, 67, 48, 16); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver(40, 16, 32, -25); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver(62, 86, 76, 23); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver(40, 78, 71, 32); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver(66, 11, 74, -56); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver(6, 9, 19, 2); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver(25, 5, 5, -21); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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 );
  }