十分之不理解

B2065 鸡尾酒疗法

poppy_gsf @ 2023-04-15 10:59:54

#include<iostream>
#include<iomanip>
using namespace std;
//定义函数 
double F(double a,double b)
{
    if(b-a>0.05)
    cout<<"better";
    else if(a-b>0.05)
    cout<<"worse";
    else
    cout<<"same";
    return 0;
}

int main()
{
    int n;
    cin>>n;

    int k,l;
    cin>>k>>l; 

    for (int i=0;i<n-1;i++)
    {
        double x1=l*1.0/k; 
        int x,y;
        cin>>x>>y;
        double x2=y*1.0/x; 
        F(x1,x2);
    }
    return 0;
}

by Sun_Email @ 2023-04-15 11:02:28

换行呢

@poppy_gsf


by poppy_gsf @ 2023-04-15 15:38:12

@Sun_Email 哎呀,AC过了,感谢感谢


|