SOA sample question 87

In the solution from the SOA for E[X ^ 20], they get 18.
In my solution, I integrated S(X) frrom 0-20, where S(X) was from the first part of the distribution: S(X) = 1-.01X. I also got 18 from my integral.

The more I think about it, I am not sure if my approach is valid with a two-part distribution.
Is my approach valid, or did I just get lucky?


SOA sample question 87