竞赛讨论区 > 请问为什么我这个代码自测通过了但提交就是错误的呢
头像
LOZU
发布于 2022-11-22 10:20 江西
+ 关注

请问为什么我这个代码自测通过了但提交就是错误的呢

#include <bits/stdc++.h>

using namespace std;

int main()

{

int t,a,b;

cin>>t;

while(t--){

cin>>a>>b;

if(a=='1'&&b=='1') cout<<0;

if(a==b){

if(a%2==0&&a!=2){

if(a/2==4) cout<<2;

else cout<<1;

}else{

if(a%2==1&&a!=9) cout<<0;

else{

if(a/2==1) cout<<0;

else cout<<1;

}

}

}else cout<<111;

cout<<endl;

}

}

全部评论

(1) 回帖
加载中...
话题 回帖

等你来战

查看全部

热门推荐