0分求改
查看原帖
0分求改
1794998
dyx2016楼主2025/7/25 08:12

我的代码是:

#include <iostream>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int x,y;
    for (int i = 1;i <= n;i++)
    {
        cin >> x >> y;
        if ((x - y) > 5||(y - x) > 5)
        {
            if ((x - y) > 5)
            {
                cout << "worse" << endl;
            }
            else
            {
                cout << "better" << endl;
            }
        }
        else
        {
            cout << "same" << endl;
        }
    }
    return 0;
}

哪里错了?

2025/7/25 08:12
加载中...