Look at these solutions. link1link2link3
All these gives an answer 1 for input 1 which should never happen(because 1 is not a prime number). But they are given AC. This is due to weak test cases.
@admin hope you would update the test cases.
On observing, most of the brute force solutions fall into this category.