NPUer_114 @ 2023-11-15 22:55:51
#include <stdio.h>
#define MAX 21
int main()
{
int n;
double a[MAX], b[MAX];
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%lf %lf",&a[i],&b[i]);
}
double effect1=b[0]/a[0];
for(int i=1;i<n;i++){
double effect0=b[i]/a[i];
if((effect1-effect0)>0.02){
printf("worse\n");
}
else if((effect0-effect1>0.02)){
printf("better\n");
}
else{
printf("same\n");
}
}
return 0;
}
by NPUer_114 @ 2023-11-15 22:57:15
1、2、10WA了
by yang2_0 @ 2023-11-15 23:08:55
by yang2_0 @ 2023-11-15 23:09:39
把0.02改成0.05