求煮——选官
查看原帖
求煮——选官
902351
Little_x_starTYJ楼主2023/11/8 16:29
#include <stdio.h>
#include <iostream>
using namespace std;
int main() {
	double a, b, c = 7, s = 0;
	scanf("%llf%llf", &a, &b);
	while (1)
	{
		if (s >= a - b)
		{
			if (s > a + b)
			{	
				puts("n");
			}
			else
				puts("y");
			return 0;
		}
		s += c;
		c *= 0.98;
	}
    return 0;
}

这道题目WA了3个点,感觉理论分析没错啊

2023/11/8 16:29
加载中...