4 条题解

  • 4
    @ 2022-12-28 9:09:46

    if判断即可

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
    	double x, y;
    	cin >> x >> y;
    	if ((x >= 60 && y < 60) || (x < 60 && y >= 60))
        {
    		cout << "green";
    	}
        else
        {
    		cout << "red";
    	}
        return 0;
    } //代码已AC
    
    • 0
      @ 2023-7-17 16:56:27
      #include <bits/stdc++.h>
      using namespace std;
      int main()
      {
          float a,b;
          cin>>a>>b;
          if((a<60&&b>=60)||(b<60&&a>=60)) cout<<"green";
          else cout<<"red";
          return 0;
      }
      
      • 0
        @ 2023-6-4 13:40:03
        #include <bits/stdc++.h>
        using namespace std;
        double a, b;
        int main()
        {
            cin >> a >> b;
            if ((a < 60 && b >= 60) || (a >= 60 && b < 60))
            {
                cout << "green";
            }
            else
            {
                cout << "red";
            }
            return 0;
        }
        
        • 0
          @ 2023-4-6 21:40:44
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
              double x,y;
              cin>>x>>y;
              if (max(x,y)>=60&&min(x,y)<60)
                  cout<<"green";
              else
                  cout<<"red";
              return 0;
          }
          • 1

          信息

          ID
          655
          时间
          1000ms
          内存
          16MiB
          难度
          4
          标签
          递交数
          162
          已通过
          72
          上传者