解题思路:
注意事项:
参考代码:
#include<stdio.h>
int main()
{
int a, b, c;
while (scanf("%d", &a) != EOF)
{
scanf("%d %d", &b, &c);
if (b <= c&&b<a)
printf("GAME OVER!\n");
else
{
int sum = 0,day=0;
while (sum < a)
{
day++;
sum += b;
if (sum >= a)
break;
sum -= c;
}
printf("%d\n", day);
}
printf("\n");
}
return 0;
}
0.0分
0 人评分