#C4737. Count the Perfect Squares

    ID: 48308 Type: Default 1000ms 256MiB

Count the Perfect Squares

Count the Perfect Squares

You are given a list of positive integers. Your task is to determine how many of these integers are perfect squares. A perfect square is an integer that can be expressed as \(y^2\) for some integer \(y\). For instance, 16 is a perfect square because \(4^2 = 16\).

Write a program that reads the input, computes the number of perfect squares in the list, and outputs the result.

inputFormat

The input consists of two lines:

  • The first line contains a single integer \(N\), the number of elements in the list.
  • The second line contains \(N\) space-separated positive integers.

outputFormat

Output a single integer: the count of numbers in the list that are perfect squares.

## sample
4
1 4 9 16
4