#include<iostream>
using namespace std;
int main()
{ float n,k;
float year=0;
float price=0;
int flag=0;
while(cin>>n>>k)//每输入一组数据就可以输出其结果,不用等待所有数据都输入完毕
{
//计算
year=1;
price=200;
for(year;year<21;year++)
{
if(year*n>price)
{
cout<<year<<endl;
flag=1;
break;
}
price=price*(1+0.01*k);
}
if(flag==0)
cout<<"impossible"<<endl;
}
return 0;
}
买房子
最新推荐文章于 2022-07-15 09:36:12 发布