#萌新求助

B2065 鸡尾酒疗法

到底错在哪里了啊
by zt17 @ 2022-05-03 09:54:34


``` #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\n"; else if (y-x > 0.05) cout << "better\n"; else cout << "same\n"; } return 0; } ``` @[Justin123_](/user/677553) 你没换行!!!
by ivyjiao @ 2022-05-03 10:03:26


[修改前](https://www.luogu.com.cn/record/75039582) [修改后](https://www.luogu.com.cn/record/75039600)
by ivyjiao @ 2022-05-03 10:04:17


@[Justin123_](/user/677553)
by ivyjiao @ 2022-05-03 10:06:42


啊链接放错了[修改前](https://www.luogu.com.cn/record/75038579)
by ivyjiao @ 2022-05-03 10:07:53


@[ivyjiao](/user/578029) 啊嘞?哪里没换行?
by zt17 @ 2022-05-03 10:30:10


@[Justin123_](/user/677553) 输出
by ivyjiao @ 2022-05-03 10:31:15


@[ivyjiao](/user/578029) 哦……谢谢!
by zt17 @ 2022-05-03 10:32:17


@[Justin123_](/user/677553) 知道方法了A了这道题吧
by ivyjiao @ 2022-05-03 10:34:13


|