#include <stdio.h>
int main(void)
{
float input, overhang = 0.0;
int count = 2;
while (1) {
scanf("%4f",&input);
if (input == 0.00)
break;
if (input > 5.20 || input < 0.01)
return -1;
count = 2;
overhang = 0.0;
while (1) {
overhang += (float)1 / (float)count;
count++;
if (overhang > input)
break;
}
printf("%d card(s)\n",count-2);
}
return 0;
}
1003
最新推荐文章于 2022-02-25 21:57:21 发布