title: Eulers Criterion Check If Square Root Under Modulo P Exists
signature: def eulers_criterion_check_if_square_root_under_modulo_p_exists(n, p):
source_py: def eulers_criterion_check_if_square_root_under_modulo_p_exists(n, p):
      n = (n % p)
      for x in range(2, p, 1):
          if (((x * x) % p) == n):
              return True
      return False
source_cpp: bool eulers_criterion_check_if_square_root_under_modulo_p_exists(int n, int p) {
    n = n % p;
    for ( int x = 2;
    x < p;
    x ++ ) if ( ( x * x ) % p == n ) return true;
    return false;
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(n, p, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              n, p),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver(71, 78, False)
      print(f"TEST-0...{result}")
  
      result = driver(85, 75, False)
      print(f"TEST-1...{result}")
  
      result = driver(4, 35, True)
      print(f"TEST-2...{result}")
  
      result = driver(20, 99, False)
      print(f"TEST-3...{result}")
  
      result = driver(71, 29, True)
      print(f"TEST-4...{result}")
  
      result = driver(72, 88, False)
      print(f"TEST-5...{result}")
  
      result = driver(36, 54, True)
      print(f"TEST-6...{result}")
  
      result = driver(95, 52, False)
      print(f"TEST-7...{result}")
  
      result = driver(83, 33, False)
      print(f"TEST-8...{result}")
  
      result = driver(72, 13, False)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: eulers_criterion_check_if_square_root_under_modulo_p_exists
question_info.test_list: [{"idx": 0, "outputs": false, "inputs": {"n": 71, "p": 78}}, {"idx": 1, "outputs": false, "inputs": {"n": 85, "p": 75}}, {"idx": 2, "outputs": true, "inputs": {"n": 4, "p": 35}}, {"idx": 3, "outputs": false, "inputs": {"n": 20, "p": 99}}, {"idx": 4, "outputs": true, "inputs": {"n": 71, "p": 29}}, {"idx": 5, "outputs": false, "inputs": {"n": 72, "p": 88}}, {"idx": 6, "outputs": true, "inputs": {"n": 36, "p": 54}}, {"idx": 7, "outputs": false, "inputs": {"n": 95, "p": 52}}, {"idx": 8, "outputs": false, "inputs": {"n": 83, "p": 33}}, {"idx": 9, "outputs": false, "inputs": {"n": 72, "p": 13}}]
question_info.entry_cls_name: Solution