TCHS SRM 49 - Level one - 250 pt Deposit Profit editorial: http://community.topcoder.com/tc?module=Static&d1=hs&d2=match_editorials&d3=hs_srm49
TCHS SRM 49 - Level one - 250 pt Deposit Profit solution:
#include <iostream> class DepositProfit{ public: int depositTerm(int a, int b, int p) { int cnt, st=a*100, m=0; a*=100, p*=100; while(cnt<p) a+=a*b/1200, cnt=a-st, m++; return m; } };
No comments:
Post a Comment