6 solutions

  • 3
    @ 2023-7-15 17:45:51

    练习c++两年半,志在让老师白吃干饭。 题库里题解不断,看名就知道是我在干。

    #include<iostream>
    using namespace std;
    int main()
    {
    int yw,sx;
    cin>>yw>>sx;
    if(yw<60&&sx>60||(yw>60&&sx<60)) cout<<1;
    else cout<<0;
    return 0;
    }
    
    • 0
      @ 2024-1-25 11:51:43
      #include<bits/stdc++.h>
      using namespace std;
      
      int main(){
      	int a,b,c=0,d=0;cin>>a>>b;
      	if(a<60)
      	c++;
      	if(b<60)
      	d++;
      	if(c==0&&d==0)
      	cout<<0;
      	else{
      		if(c>0&&d>0){
      			cout<<0;
      		}
      		else
      		cout<<1;
      	}
      	return 0;
      }
      
      
      • 0
        @ 2023-10-29 14:40:46

        发个用异或做的:

        #include<iostream>
        #include<cmath>
        using namespace std;
        int main()
        {
         int n,m;
         cin>>n>>m;//输入
         //换为bool
         if(n<60)n=0;else n=1;
         if(m<60)m=0;else m=1;
         if(n^m)cout<<1;
         else cout<<0;
         return 0;//完结散花
        }
        
        • 0
          @ 2023-9-16 16:36:14

          #include using namespace std; int main() { int a,b; cin>>a>>b; int flag=0; if(a<60)flag++; if(b<60)flag++; if(flag==1)cout<<"1"; else cout<<"0"; }

          • -1
            @ 2023-10-5 15:21:15
            #include<iostream>
            #include<iomanip> 
            using namespace std;
            int main(){ 
                int yw,sx;
                cin>>yw>>sx; 
                if(yw<60&&sx>60||(yw>60&&sx<60)) cout<<1;
                else cout<<0;
                return 0;
            }//我的评价是:万能头。
            
            • -2
              @ 2023-9-16 17:05:51
              #include<iostream>
               #include<iomanip> 
               using namespace std; 
               int main() { int yw,sx; cin>>yw>>sx; if(yw<60&&sx>60||(yw>60&&sx<60)) cout<<1; else cout<<0; return 114514; }
              
              • 1

              Information

              ID
              535
              Time
              1000ms
              Memory
              256MiB
              Difficulty
              5
              Tags
              # Submissions
              100
              Accepted
              40
              Uploaded By