Percentages and rates

24 Views Asked by At

This is really easy question, but my mind is slow today.

If it takes 7200 seconds to reach 33% of some amount, how long does it take to reach 0%? You can assume that the relationship between time and amount is linear.

I need to express this in a formula/code.

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $A$ be the initial amount and $r$ be the rate of decrease. The amount left after time $t$ is $A-rt$.

From the information you gave:

$$A-7200r=0.33A\iff r=\frac{0.67}{7200}A$$

You want the $T$ such that

$$A-rT=0\iff T=\frac{A}{r}$$

Plugging in for $r$ gives $T=\frac{7200}{0.67}$.