#P8754. [蓝桥杯 2021 省 AB2] 完全平方数
[蓝桥杯 2021 省 AB2] 完全平方数
Problem Description
An integer is a perfect square number, meaning it is the square of some integer. That is, there exists an integer such that .
Given a positive integer , find the smallest positive integer such that their product is a perfect square number.
Input Format
The input contains one line with a positive integer .
Output Format
Output the smallest positive integer found.
12
3
15
15
Hint
For of the testdata, , and the answer does not exceed .
For of the testdata, , and the answer does not exceed .
For all testdata, , and the answer does not exceed .
Lanqiao Cup 2021, Second Round Provincial Contest, Group A Problem G (Group B Problem H).
Translated by ChatGPT 5