Solved Problem - Check Prime

In this lesson, we'll look at an efficient way to perform the primality test.

We'll cover the following...

Problem statement

Given a number, NN, check if it’s prime or not. Do this for TT test cases.

Input format

The first line contains a positive integer TT (1T103)(1 \leq T \leq 10^3) ...