PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000035. Biểu diễn thành tích lũy thừa (Number Factorization)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Biểu diễn thành tích lũy thừa (Number Factorization)
Number Factorization
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer , consider all pairs of positive-integer arrays and of equal length such that:
- ;
- and for every ;
- each is a product of one or more distinct prime numbers, with no repeated prime factor.
Find the maximum possible value of . The number of terms need not be optimized.
Input
One line containing the integer .
Output
Print the maximum value of as one integer.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Input
100
Output
20
Explanation
Since , choosing , is valid because is square-free. It yields , the maximum. Using is invalid because contains squared prime factors.
Input
10
Output
10
Explanation
Since , choosing , gives . Splitting into factors and gives only .