1 条题解

  • 0
    @ 2025-3-13 14:17:03
    using namespace std;
    bool hinl(double temp,bool cough)
    {
    	return temp >=37.5&&cough==1; 
    }
    int main()
    {
    	int n;
    	cin>>n;
    	int cnt=0;
    	for(int i=1;i<=n;i++)
    	{
    		string name;
    		double temp;
    		bool cough;
    		cin>>name>>temp>>cough;
    		if(hinl(temp,cough)==true)
    		{
    			cout<<name<<endl;
    			cnt++;
    		}
    	}
    	cout<<cnt<<endl;
    	return 0;
     } 
     
     
    
    
    • 1

    信息

    ID
    181
    时间
    1000ms
    内存
    128MiB
    难度
    6
    标签
    (无)
    递交数
    15
    已通过
    11
    上传者