compare the triplets hackerrank java
calculate bond value with discount rate