C(w) =P270 (W) how to solve in function