滑稽张峻铭 发表于 2021-6-13 17:49:39

http://noi.openjudge.cn/ch0105/24/

问题如标题
程序如内容
程序哪里有问题?
#include <stdio.h>
int main()
{
int a,b,c,d,e = 0;
scanf("%d",&a);
for (int i = 0;i < a;i++)
{
    scanf("%d %d",&b,&c);
    if ((b >= 90) && (b <= 140) && (c >= 60) && (c <= 90))
    {
      d++;
    }
    else
    {
      d = 0;
    }
}
printf("%d",d);
return 0;
}

滑稽张峻铭 发表于 2021-6-13 18:07:16

a

万千只cnm 发表于 2021-6-13 18:38:36

你题目呢
scanf 两个%d中间空格去掉
页: [1]
查看完整版本: http://noi.openjudge.cn/ch0105/24/