PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000153. Trường hữu hạn và lũy thừa nguyên tố (Older Brother)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Trường hữu hạn và lũy thừa nguyên tố (Older Brother)
Older Brother
Source: Kattis / BAPC 2016
Version: Phuoc Hung OJ Extended — one dataset per judge run.
Problem Statement
A finite field of order exists if and only if for a prime and an integer . Given , determine whether such a field exists.
Input
One line containing the integer .
Output
Print yes if is a prime power, otherwise print no.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Example
Input
65536
Output
yes
Explanation
Since , it is a prime power; hence the answer is yes.