Marks :100
: 2 | : 0
Amit is fond of Magic number. one day he is planning a trip from City A to B where there is exactly N rest point between both the cities and every rest point have an ID(Not necessary unique), Amit stop only those rest point whose ID(Hotel ID) is a magic number. if there is no rest point whose ID is a magic number then Amit didn't stop at any such points and reached city B directly. Now before planning the trip Amit wants to know In how many rest points he can stop his car and have some rest.
Note: According to Amit magic number is a number which is a perfect Square of any number eg:0,1,4,9....N
The first line of the test case contains a single integer N ($$$0 \le N, M \le 10^6$$$) — the number of rest points from city A to B.
The second line of each test case contains N integers $$$a_i$$$, $$$a_{i+1}$$$ ..... $$$a_{n-1}$$$ ($$$0 \le a_i \le 10^6$$$) — the ID of each rest point or hotel number .
For each test case, print one integer on a single line — the count of total numbers magic number that Amit has.
5 25 77 54 81 48
2
10 0 3 5 10 15 16 18 19 200 625
3
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.