Step 1: Understanding the Concept
The set \(S\) is given by \(x^2-11x+30\le0\), that is \((x-5)(x-6)\le0\), so \(S=[5,6]\).
Step 2: Derivative
\(f'(x)=9x^2-36x+27=9(x-1)(x-3)\).
For \(x\in[5,6]\), \(f'(x)>0\), so \(f\) is increasing.
Step 3: Maximum point
The maximum is at \(x=6\).
Step 4: Evaluate
\(f(6)=3\cdot216-18\cdot36+27\cdot6-40=648-648+162-40=122\).
Final Answer:
The maximum value is 122.
\[ \boxed{\text{(A) }122} \]