Back to General discussions forum
I spotted the e-mail and took a quick look at the problem before going to bed. I foolishly decided to code it and submit the solution.
There may be a problem but it could just be me being too tired to spot something obvious.
Just in case there is a problem, this is what happened. My program found a very short loop WNE JYC WNE rather than the significantly longer loop that I was expecting. I checked the data and found the following two lines:
WNE JYC 0.34233321073854 JYC WNE 3.3205509429651
Multiplying the exchange rates gives 1.13673486573 which appears to be a significant profit. The problem setter informs me that I am left with only 87% of what I invested.
Please excuse me if I have made a mistake. I'm clearly too tired to spot it and am going to bed!
Thanks, interesting problem. But I agree, somewhere seems to be a little bug.
Good Morning, Friends! Sorry for confusion, there seem to be two issues - by now hopefully improved:
Thanks a lot for provided examples. Please kindly retry.
Thanks for correcting the problem. If I hadn't been so tired last night I would have realised that the exchange rates given were the inverse of the ones in the problem description. It was a really nice problem. Thanks!