6 solutions
- 1
Information
- ID
- 535
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 5
- Tags
- # Submissions
- 100
- Accepted
- 40
- Uploaded By
#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;
}
发个用异或做的:
#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;//完结散花
}
#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"; }
#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;
}//我的评价是:万能头。
#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; }
By signing up a ZXOJ universal account, you can submit code and join discussions in all online judging services provided by us.