PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000385. Số nhỏ nhất có đúng n ước (Number With The Given Amount Of 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
Số nhỏ nhất có đúng n ước (Number With The Given Amount Of Divisors)
Number With The Given Amount Of Divisors
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
A positive divisor of is a positive integer such that divides . For example, the positive divisors of are .
Given , find the smallest positive integer having exactly positive divisors. It is guaranteed that the answer does not exceed .
Input
A single integer .
Output
The smallest positive integer with exactly positive divisors.
Subtasks
-
Subtask 1 (20 points): , answer .
-
Subtask 2 (30 points): , answer .
-
Subtask 3 (50 points): , answer .
Examples
Example 1
Input
4
Output
6
Explanation
has four positive divisors, , whereas every smaller positive number has fewer than four.
Example 2
Input
6
Output
12
Explanation
has positive divisors. No smaller positive integer has exactly six.