文章
34
粉丝
109
获赞
7
访问
19.3k
#include <stdio.h>
int main()
{
int m;
double n;
while (scanf("%d %lf", &m, &n) != EOF)
{
int price = 200;
int award = m;
int day = 0;
if (m >= 200)
{
printf("1\n");
}
else
{
while (award < price && day < 21)
{
award += m;
price += price * (n / 100);
day++;
}
if (award >= price)
{
printf("%d\n", day + 1);
}
if (day >= 21)
{
printf("Impossible\n");
}
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发