如何构造具有特定数量因子的CodeForces-27E反素数?

2026-04-30 17:308阅读0评论SEO基础
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计923个文字,预计阅读时间需要4分钟。

如何构造具有特定数量因子的CodeForces-27E反素数?

题目:给定一个整数n,找出具有恰好n个因子的最小的正整数。保证对于给定的n,答案不会超过10^18。

输入:输入的第一行包含一个整数n(1≤n≤10^18)。

题干:

Given the numbern, find the smallest positive integer which has exactlyndivisors. It is guaranteed that for the givennthe answer will not exceed1018.

Input

The first line of the input contains integern(1 ≤ n ≤ 1000).

Output

Output the smallest positive integer with exactlyndivisors.

Examples

Input

4

Output

6

Input

6

Output

12

题目大意:

给定一个正整数n,求一个最小的正整数,使得它的因子个数恰为n。保证答案不超过1018

解题报告:

这题用到了一个概念叫反素数、、学习了一波。,但是其实就算没有这个概念,做法也很显然吧,,做个唯一分解这题就做完了。知识点在下面附上了。

阅读全文

本文共计923个文字,预计阅读时间需要4分钟。

如何构造具有特定数量因子的CodeForces-27E反素数?

题目:给定一个整数n,找出具有恰好n个因子的最小的正整数。保证对于给定的n,答案不会超过10^18。

输入:输入的第一行包含一个整数n(1≤n≤10^18)。

题干:

Given the numbern, find the smallest positive integer which has exactlyndivisors. It is guaranteed that for the givennthe answer will not exceed1018.

Input

The first line of the input contains integern(1 ≤ n ≤ 1000).

Output

Output the smallest positive integer with exactlyndivisors.

Examples

Input

4

Output

6

Input

6

Output

12

题目大意:

给定一个正整数n,求一个最小的正整数,使得它的因子个数恰为n。保证答案不超过1018

解题报告:

这题用到了一个概念叫反素数、、学习了一波。,但是其实就算没有这个概念,做法也很显然吧,,做个唯一分解这题就做完了。知识点在下面附上了。

阅读全文