PRF192_-_PE_-_FA_2024_3201.webp
G

PRF192_-_PE_-_FA_2024_3201.webp

  • Media owner Greed94
  • Ngày thêm
Definition
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.For example, 2, 3, 5, 7, and 11 are prime numbers.
Input
The first line contains the number of elements N.
The second line contains N integers representing the elements of the array, each number separated by one space.
Constraint
1 ≤ N ≤1000
1< a[i] < 109,0≤i≤N-1.
Output
Please print out the largest prime number in the array.
If there is no prime number, print 0.
Sample
Input
4
8 10 12 14
6
17 23 15 19 21 22
Output
0
23
Class:
Sample 1
Sample 2
Practical Paper
3/4
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
PRF192
Thêm bởi
Greed94
Ngày thêm
Lượt xem
1,341
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRF192_-_PE_-_FA_2024_3201.webp
File size
319.3 KB
Dimensions
2880px x 1358px

Share this media

Back
Bên trên Bottom