How many numbers are there having exactly one factor?
There is only one number which has exactly one factor, that is 1
How many numbers are there between 1and100 which have exactly three factors?
How many three digit numbers have exactly three factors?
How many numbers are there between 100 and 1000 which exactly have one of their digits as 7?
Please answer efficiently.