PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000189. Các số có đúng chín ước (9 Divisors)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Các số có đúng chín ước (9 Divisors)
9 Divisors
Source: AtCoder ABC383 D — https://atcoder.jp/contests/abc383/tasks/abc383_d
Edition: Phuoc Hung OJ Extended; one dataset per program run. Subtasks are authored for PHOJ, not claimed to be official.
Problem
Count positive integers with exactly nine positive divisors. Each valid number is either or for distinct primes .
Input
One integer .
Output
Print the number of integers with exactly nine divisors.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Example
Input
200
Output
3
Explanation
Exactly , , and have nine divisors among positive integers not greater than .