3 条题解

  • 3
    @ 2023-8-17 19:07:32

    又是挥肠简单的一道题辣👀️

    直接上代码👍

    #include <bits/stdc++.h>
    using namespace std;
    int z , r , d;
    int main()
    {
        int n , x;
        cin >> n;
        for (int i = 0; i < n; i++) 
        {
            cin >> x;
            if (x < 90) r++;
            else if (x == 90) z++;
            else d++;
        }
        cout << z << " " << r << " " << d;
        return 0;
    }
    

    已AC,放心食用吧

    • @ 2023-9-24 15:15:05
      #include <bits/stdc++.h>
      using namespace std;
      int n, a[105], z, r, d;
      int main()
      {
          cin >> n;
          for (int i = 1; i <= n; i++)
          {
              cin >> a[i];
              if (a[i] == 90)
                  z++;
              if (a[i] < 90)
                  r++;
              else
                  d++;
          }
          cout << z << " " << r << " " << d;
          return 0;
      }
      

      这位神犇的做法与本蒟蒻这么相似诶

  • 1
    @ 2023-6-23 10:15:54
    #include <bits/stdc++.h>
    using namespace std;
    int n, m, sumzhi, sumrui, sumdun;
    int main()
    {
        cin >> n;
        for (int i = 1; i <= n; i++)
        {
            cin >> m;
            if (m == 90)
            {
                sumzhi += 1;
            }
            else if (m < 90)
            {
                sumrui += 1;
            }
            else 
            {
                sumdun += 1;
            }
        }
        cout << sumzhi << " " << sumrui << " " << sumdun;
        return 0;
    }
    
    • 0
      @ 2022-12-24 19:45:03
      #include <iostream>//hetao3097453
      using namespace std;
      int a[101];
      int main()
      {
          int n,zhi = 0,rui = 0,dun = 0;
          cin >> n;
          for(int i = 1;i <= n;i++)
          {
              cin >> a[i];
          }
          for(int i = 1;i <= n;i++)
          {
              if(a[i] == 90)
              {
                  zhi++;
              }
              else if(a[i] > 90)
              {
                  dun++;
              }
              else if(a[i] < 90)
              {
                  rui++;
              }
          }
          cout << zhi << " " << rui << " " << dun << endl;
          return 0;
      }
      
      
      • 1

      【入门】统计直角、锐角、钝角的个数?

      信息

      ID
      800
      时间
      1000ms
      内存
      64MiB
      难度
      1
      标签
      递交数
      71
      已通过
      56
      上传者