C++题解
2026-08-03 10:40:07
发布于:山西
4阅读
0回复
0点赞
C++代码:
#include <iostream>
using namespace std;
int main(){
int n;float k;
cin>>n>>k;
int a=0,y=1;
float s=200.0;
while (y<=20){
a+=n;
if (a>=s){
cout<<y;
return 0;
}
s*=(1+k/100.0);
y++;
}
cout<<"Impossible";
return 0;
}
这里空空如也








有帮助,赞一个