Số nguyên tố

View as PDF



Problem type
Allowed languages
Assembly, Awk, Brain****, C, C++, Java, Pascal, Perl, Python, SCRATCH, Sed, Text
Points: 5 Time limit: 1.0s Memory limit: 1G Input: stdin Output: stdout

Cho số nguyên dương \(N\)

Yêu cầu

Kiểm tra xem \(N\) có phải là số nguyên tố hay không

Dữ liệu vào

  • Dòng \(1\): Ghi số \(N (N < 10^{14})\)

Dữ liệu ra

  • Dòng \(1\): Ghi Y nếu số \(N\) là số nguyên tố, ngược lại ghi N
Sample 1
Input
13
Output
Y
Sample 2
Input
130
Output
 N

Comments

Most recent
Loading comments...

There are no comments at the moment.