2 条题解

  • 0
    @ 2024-4-27 9:49:44

    这题很神奇,根本不需要判断5,只需要判断是否有且只有1个7就行了

    #include<iostream>
    using namespace std;
    int main(){
        int a,b,c,cnt=0;
        cin>>a>>b>>c;
        if(a==7)    cnt++;
        if(b==7)    cnt++;
        if(c==7)    cnt++;
        if(cnt==1)  cout<<"YES"<<endl;
        else    cout<<"NO"<<endl;
        return 0;
    }
    
    • 0
      @ 2024-2-4 12:29:50

      简单,模拟即可。

      #include <bits/stdc++.h>
      using namespace std;
      
      int a, b, c;
      int main() {
           cin >> a >> b >> c;
           if(a == 5 and b == 5 and c == 7) cout << "YES";
           else if(a == 5 and b == 7 and c == 5) cout << "YES";
           else if(a == 7 and b == 5 and c == 5) cout << "YES";
           else cout << "NO";
           return 0;
      }
      
      
      • 1

      [ABC042A] 和風いろはちゃんイージー

      信息

      ID
      442
      时间
      2000ms
      内存
      256MiB
      难度
      1
      标签
      (无)
      递交数
      111
      已通过
      14
      上传者