其他分享
首页 > 其他分享> > 正常血压

正常血压

作者:互联网

正常血压

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
	int n = 0;
	scanf("%d",&n);
	int count = 0;
	int tmp_c = 0;
	for(int i = 0;i<n;i++)
	{
	
		int tmp1,tmp2;
		scanf("%d %d",&tmp1,&tmp2);
		if(tmp1>=90 && tmp1 <= 140 &&tmp2>=60 &&tmp2<=90)
		{
			tmp_c++;
		}
		else
		{
			tmp_c=0;
		}
		if(tmp_c>count)
		{
			count = tmp_c;
		}
	
		
	}
	printf("%d",count);
	return 0;
 } 

标签:count,int,血压,60,正常,90,include
来源: https://blog.csdn.net/qq_39901722/article/details/104884623