title: Count Distinct Non Negative Pairs X Y Satisfy Inequality Xx Yy N 2
signature: pub fn count_distinct_non_negative_pairs_x_y_satisfy_inequality_xx_yy_n_2(n: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        61, 
        54
      ));
      
      println!("TEST-1...{}", driver(
        45, 
        41
      ));
      
      println!("TEST-2...{}", driver(
        53, 
        50
      ));
      
      println!("TEST-3...{}", driver(
        4, 
        4
      ));
      
      println!("TEST-4...{}", driver(
        82, 
        73
      ));
      
      println!("TEST-5...{}", driver(
        86, 
        79
      ));
      
      println!("TEST-6...{}", driver(
        37, 
        35
      ));
      
      println!("TEST-7...{}", driver(
        48, 
        43
      ));
      
      println!("TEST-8...{}", driver(
        81, 
        71
      ));
      
      println!("TEST-9...{}", driver(
        50, 
        45
      ));
      
  }
source_py: def count_distinct_non_negative_pairs_x_y_satisfy_inequality_xx_yy_n_2(n):
      res = 0
      x = 0
      while ((x * x) < n):
          y = 0
          while (((x * x) + (y * y)) < n):
              res = (res + 1)
              y = (y + 1)
          x = (x + 1)
      return res
source_cpp: int count_distinct_non_negative_pairs_x_y_satisfy_inequality_xx_yy_n_2(int n) {
    int res = 0;
    for ( int x = 0;
    x * x < n;
    x ++ ) for ( int y = 0;
    x * x + y * y < n;
    y ++ ) res ++;
    return res;
  }