結果

問題 No.3236 累乗数大好きbot
ユーザー kidodesu
提出日時 2025-08-15 22:09:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 498 ms / 4,000 ms
コード長 314 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 82,744 KB
実行使用メモリ 209,408 KB
最終ジャッジ日時 2025-08-15 22:09:50
合計ジャッジ時間 15,966 ms
ジャッジサーバーID
(参考情報)
judge2 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

q = int(input())
from collections import defaultdict
dict = defaultdict(lambda: 1)
for now in range(2, 10**6+1):
    tmp = now * now
    cnt = 2
    while tmp <= 10**12:
        dict[tmp] = max(dict[tmp], cnt)
        cnt += 1
        tmp *= now

M = [int(input()) for _ in range(q)]
for n in M:
    print(dict[n])
0