A Simple and Provable Scaling Law for the Test-Time Compute of Large Language Models