26.0k views
1 vote
Cerința

Se citesc de la tastatură n numere naturale. Să se determine numărul de numere prime formate din ultimele 2 cifre ale fiecărui număr.



Date de intrare


Fișierul de intrare 2prim.in conține pe prima linie numărul n, iar pe a doua linie n numere naturale din intervalul [10,10000] separate printr-un spațiu.



Date de ieșire


Fișierul de ieșire 2prim.out va conține numărul de numere care au proprietatea de mai sus.



Restricții și precizări


1 ≤ n ≤ 10000

User Michael IV
by
4.6k points

1 Answer

4 votes

Step-by-step explanation:

Unclear question. But I inferred this to be the clearer rendering of the text below;

Requirement

They are read from the keyboard in natural numbers. Determine the number of prime numbers formed by the last 2 digits of each number.

Input data

The input file 2prim.in contains on the first line the number n, and on the second line n natural numbers in the range [10,10000] separated by a space.

Output data

The 2prim.out output file will contain the number of numbers that have the above property.

Restrictions and clarifications

1 ≤ n ≤ 10000.

User Kuntal Shaw
by
4.7k points