提交时间:2024-02-10 14:15:56

运行 ID: 40404

#include<iostream> using namespace std; int main() { int k,num1,num2,j1,j2; double numl,jl; cin>>k>>j1>>j2; jl=j2*1.0/j1; for(int i=1;i<k;i++){ cin>>num1>>num2; numl=num2*1.0/num1; if(numl-jl>0.05){ cout<<"better"<<endl; } else if(jl-numl>0.05){ cout<<"worse"<<endl; } else{ cout<<"same"<<endl; } } }