No.3236 Perfect Power Loving bot
レベル : / 実行時間制限 : 1ケース 4.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 77
作問者 :
ジュ・ビオレ・グレイス
/ テスター :
👑
p-adic
タグ : / 解いたユーザー数 77
作問者 :
ジュ・ビオレ・グレイス
/ テスター :
👑
問題文最終更新日: 2025-08-15 21:27:43
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 478 オムニバス
(順位表)
の他の問題:
Problem Statement
The execution time limit for this problem is 4000ms.
Problem Statement
An integer that can be expressed as $a^n$ with an integer $a \geq 2$ and a positive integer $n$ is called an $n$-th power.
You are given $Q$ integers $N_1, \dots, N_Q$, each at least $2$, from the input.
For each $q = 1, \dots, Q$, find the positive integer $n_q$ such that $N_q$ is an $n_q$-th power and, whenever $n > n_q$, $N_q$ is not an $n$-th power.
Input
$Q \\ N_1 \\ \vdots \\ N_Q$
$1 \leq Q \leq 10^5,$
$2 \leq N_q \leq 10^{12}$
are integers.
Output
Find $n_q$ and output
$n_1 \\ \vdots \\ n_Q$in this format. Print a newline at the end.
Sample
Sample 1
Input
2 16 19
Output
4 1
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。