Given \(f(mn)=f(m)f(n)\) and \(f(24)=54,\)
\(f(24)=2×3×3×3\)
\(f(2×12)=f(2)f(12)=f(2)f(2×6)=f(2)f(2)f(6)=f(2)f(2)f(2×3)=f(2)f(2)f(2)f(3)=2×3×3×3\)
Given that \(f(1), f(2)\), and \(f(3)\) are all positive integers, by comparison, we get \(f(2)=3\) and \(f(3)=2\). We can safely take \(f(1)=1.\)
Now, \(f(18)=f(2)(9)=f(2)f(3×3)=f(2)f(3)f(3)=3×2×2=12.\)