This is to check prime number and get the range upto prime number and count upto range of the prime number.
It is most efficient and quickest way to check for the prime number. 
Therefore, it is most preferred in competitive programming. 
Next time while attempting any question in competitive programming, use this method for best results.