1 条题解

  • 0
    @ 2026-2-3 10:42:50

    C++ :

    #include <bits/stdc++.h>
      
    using namespace std;
      
    int main()
    {
        int n;
        cin >> n;
          
        string s;
        float a;
        int b, cnt = 0;
        for(int i = 0; i < n; i++){
            cin >> s >> a >> b;
              
            if(a >= 37.5 and b){
                cout << s << endl;
                cnt++;
            }
        }
          
        cout << cnt << endl;
    }
    

    Python :

    # coding=utf-8
    n=int(input())
    mylist=[]
    s=0
    for i in range(n):
        newline=list(input().split())
        if float(newline[1])>=37.5 and int(newline[2])==1:
            s+=1
            mylist.append(newline[0])
    for name in mylist:
        print(name)
    print(s)
    
    • 1

    信息

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