No.300 Square Numbers
レベル :
/ AI推定難易度 : 500
/ 実行時間制限 : 1ケース 1.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 368
作問者 :
kzyKT
タグ : / 解いたユーザー数 368
作問者 :
問題文最終更新日: 2026-06-29 06:19:33
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 126
(順位表)
の他の問題:
Problem Statement
A square number is an integer that can be expressed as the $2$nd power of some integer.
Given $X$, find the minimum $Y$ such that
$X \ × \ Y \ = \ Z^2 \ (X,Y,Z$ are natural numbers greater than or equal to 1$,Z^2$ is a square number$)$
holds.
Input
X
$X$ is given on $1$ line.
$1 \le X \le 10^{12}$
Output
Output on $1$ line the minimum $Y$ such that $X×Y$ is a square number.
Sample
Sample 1
Input
4
Output
1
Sample 2
Input
8
Output
2
Sample 3
Input
459431198626
Output
114514
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。