fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n;
  5. cin>>n;
  6. for(int xh=0;xh<n;xh++){
  7. string s;
  8. int pv,mb;
  9. cin>>s>>pv>>mb;
  10. if(pv<15||pv>20||mb<50||mb>70){
  11. cout<<s<<endl;
  12. }
  13. }
  14. }
Success #stdin #stdout 0s 15240KB
stdin
4
Amy 15 70
Tom 14 60
Joe 18 50
Zoe 21 71
stdout
Tom
Zoe