C Program
#include<stdio.h>
int main(){
int n;
scanf("%d",&n);
int count=0;
while(n--){
double width,height;
scanf("%lf%lf",&width,&height);
// mandatory exact format
if(width/height>=1.6 && width/height<=1.7)
count++;
else if(height/width >=1.6 && height/width<=1.7)
count++;
}
printf("%d",count);
return 0;
}
0 Comments