#萌新求助
查看原帖
#萌新求助
677553
zt17楼主2022/5/3 09:49

啊啊啊全WA了 代码:

#include <bits/stdc++.h>
using namespace std;

int main()
{
	int n;
	cin >> n;
	int a,b;
	cin >> a >> b;
	for (int i=2;i<=n;i++)
	{
		int a1,b1;
		cin >> a1 >> b1;
		double x,y;
		x = b*1.00/a;
		y = b1*1.00/a1;
		if(x-y > 0.05) cout << "worse";
		else if (y-x > 0.05) cout << "better";
		else cout << "same";
	}
	return 0;
}
2022/5/3 09:49
加载中...