为什么老60分啊QWQ
查看原帖
为什么老60分啊QWQ
1461732
l_Zilch_l楼主2024/10/10 19:42
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int a,b;
    double x,y;
    cin>>a>>b;
    x=1.0*b/a;
    for(int i=2;i<=n;i++)
    {
        cin>>a>>b;
        y=1.0*b/a;
        if(y-x>0.05)
        cout<<"better"<<endl;
        else if(y-x<0.05)
        cout<<"worse"<<endl;
        else
        cout<<"same"<<endl;
    }
    return 0;
}
2024/10/10 19:42
加载中...