importjava.util.*;publicclassMain{staticdouble w0;staticdouble w;staticint m;publicstaticvoidmain(String[] args){Scanner sc =newScanner(System.in);
w0 = sc.nextDouble();
w = sc.nextDouble();
m = sc.nextInt();//利率的范围 0.000- 3.000double l =0;double r =3;while(l +0.0001< r){double mid =(l + r)/2;if(check(mid,w0)){
l = mid;}else{
r = mid;}}// %表示; 最后精度保证 l 和 r 都满足System.out.printf("%.1f",l *100);}// li : 利率publicstaticbooleancheck(double li,double money){//需要还的钱for(int i =1; i <= m ; i++){
money = money *(1+ li)- w;}if(money >0){//还不清,利率太大returnfalse;}//已还清returntrue;}}