title: Composite Number
signature: class Solution {
  
      public Boolean compositeNumber(Integer n) {
source_py: def composite_number(n):
      if (n <= 1):
          return False
      if (n <= 3):
          return False
      if (((n % 2) == 0) or ((n % 3) == 0)):
          return True
      i = 5
      while ((i * i) <= n):
          if (((n % i) == 0) or ((n % (i + 2)) == 0)):
              return True
          i = (i + 6)
      return False
source_cpp: bool composite_number(int n) {
    if ( n <= 1 ) return false;
    if ( n <= 3 ) return false;
    if ( n % 2 == 0 || n % 3 == 0 ) return true;
    for ( int i = 5;
    i * i <= n;
    i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return true;
    return false;
  }
question_info.extension: java
question_info.entry_fn_name: compositeNumber
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"n": 62}}, {"idx": 1, "outputs": false, "inputs": {"n": 13}}, {"idx": 2, "outputs": false, "inputs": {"n": 29}}, {"idx": 3, "outputs": true, "inputs": {"n": 72}}, {"idx": 4, "outputs": true, "inputs": {"n": 30}}, {"idx": 5, "outputs": true, "inputs": {"n": 20}}, {"idx": 6, "outputs": true, "inputs": {"n": 10}}, {"idx": 7, "outputs": false, "inputs": {"n": 47}}, {"idx": 8, "outputs": true, "inputs": {"n": 91}}, {"idx": 9, "outputs": true, "inputs": {"n": 52}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Boolean expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(62, true);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(13, false);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(29, false);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(72, true);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(30, true);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(20, true);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(10, true);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(47, false);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(91, true);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(52, true);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__