As a citizen of Riddler Nation, you are visiting the United States. Upon landing at an American airport, you would like to exchange your 100 Riddlerian rupees for some American currency. Fortunately, you notice a currency exchange station where it might just be possible to make a profit.
The dollar is known to be more valuable than the rupee. Now this station says they will give you D dollars for each rupee, where D is a decimal less than 1 that goes to the hundredths place. So D can be 0.99, 0.50 or 0.37, but not values like 0.117 or 1/𝜋. And when exchanging dollars back into rupees, the station uses an exchange rate of R, where R is equal to 1/D rounded to the nearest hundredth. (Yes, that last part is very important.)
For example, suppose D is 0.53. In this case, when you trade in 100 rupees, you’ll receive \$53. When trading the \$53 dollars back, the station uses an exchange rate of 1/0.53, or 1.88679…, which they round up to 1.89. And so returning the \$53 gets you 100.17 rupees — a net profit!
What value of D will earn you the greatest profit for your 100 rupees? (Remember, D is a decimal that goes to the hundredths place and is less than 1.)
I ran code for all 99 decimals.