Physics question

bare with me i have just done calculus for the last 12 hours.

but is there a formula to figure out how many hill repeats that will equate to a long ride?

for the hill

rise over run x distance x resistance

for flatish long (PCH in San Diego)

distance x resistance?

thanks

Ben

Watts x time. In both cases.