結果
| 問題 |
No.3236 累乗数大好きbot
|
| コンテスト | |
| ユーザー |
tokugh
|
| 提出日時 | 2025-08-15 22:53:01 |
| 言語 | Julia (2.11.2) |
| 結果 |
AC
|
| 実行時間 | 1,111 ms / 4,000 ms |
| コード長 | 579 bytes |
| コンパイル時間 | 175 ms |
| コンパイル使用メモリ | 7,712 KB |
| 実行使用メモリ | 346,976 KB |
| 最終ジャッジ日時 | 2025-08-15 22:54:06 |
| 合計ジャッジ時間 | 36,434 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 31 |
ソースコード
toI(s=readline()) = parse(Int,s)
toVI(s=readline()) = parse.(Int,split(s))
rep(f,n) = [f() for _ in 1:n]
@enum YN Yes=1 No=0
function main()
q = toI()
ns = rep(toI,q)
solve(q,ns) .|> println
end
function solve(q,ns)
dict = Dict{Int,Int}()
for x in 2:10^6
y = 1
p = 0
while y ≤ 10^12÷x
y *= x
p += 1
if !haskey(dict,y)
dict[y] = p
end
end
end
map(ns) do n
get(dict,n,1)
end
end
@static if endswith(@__FILE__, PROGRAM_FILE)
main()
end
tokugh