PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000155. Số lượng ước nguyên tố phân biệt lớn nhất (Leonardo's Prime Factors)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Số lượng ước nguyên tố phân biệt lớn nhất (Leonardo's Prime Factors)
Leonardo's Prime Factors
Source: HackerRank
Version: Phuoc Hung OJ Extended — one dataset per judge run.
Problem Statement
Given , find the maximum possible number of distinct prime factors of any integer with . Integer has zero prime factors.
Input
One line containing the integer .
Output
Print the maximum count.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Example
Input
500
Output
4
Explanation
The first four distinct primes have product , while multiplying by the next prime exceeds ; answer: .