PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000185. AABCC — tích ba số nguyên tố
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
AABCC — tích ba số nguyên tố
AABCC
Phuoc Hung OJ ID: PRIME000190
Source: AtCoder ABC300 D (PHOJ Extended, one input instance per run).
Problem statement
Given an integer , count positive integers that can be expressed as , where are three prime numbers.
Input
One integer .
Output
Print the number of qualifying integers.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Example
Input
1000
Output
3
Explanation: The three qualifying integers are 300 = 2^2 x 3 x 5^2, 588 = 2^2 x 3 x 7^2 and 980 = 2^2 x 5 x 7^2.