Files
python/TangDou/XiTi/1356.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

27 lines
628 B
C++

#include <bits/stdc++.h>
using namespace std;
struct Person {
string name; //姓名
float temperature; //体温
int cough; //咳嗽
};
int main() {
int n, count = 0;
cin >> n;
//声明动态数组
Person *person = new Person[n];
for (int i = 0; i < n; ++i) {
cin >> person[i].name >> person[i].temperature >> person[i].cough;
if (person[i].temperature >= 37.5 && person[i].cough) {
cout << person[i].name << endl;
count++;
}
}
cout << count << endl;
// 删除动态数组
delete[]person;
return 0;
}