@@ -0,0 +1,821 @@
+package com.github.conradoqg.studydsa.hackerrank.challenges.ctci;%0A%0Aimport java.util.Scanner;%0A%0Apublic class Primality %7B%0A    public static boolean isPrime(int number) %7B%0A        // Number 0, 1 are not prime%0A        if (number %3C 2) return false;%0A        %0A        int squareRoot = (int) Math.sqrt(number);%0A        for (int testNumber = 2; testNumber %3C= squareRoot; testNumber++) %7B%0A            if (number %25 testNumber == 0) return false;            %0A        %7D%0A        %0A        return true;%0A    %7D%0A    %0A    public static void main(String%5B%5D args) %7B%0A        try (Scanner in = new Scanner(System.in)) %7B%0A            int p = in.nextInt();%0A            for (int a0 = 0; a0 %3C p; a0++) %7B%0A                int n = in.nextInt();%0A                System.out.println(isPrime(n) ? %22Prime%22 : %22Not prime%22);%0A            %7D%0A        %7D        %0A    %7D%0A%7D%0A

Add primality CTCI challenge