Nightmare


私信TA

用户名:uq_70103011803

访问量:1758

签 名:

等  级
排  名 26861
经  验 520
参赛次数 1
文章发表 6
年  龄 21
在职情况 学生
学  校 贵州商学院
专  业 物联网工程

  自我简介:

解题思路:挑战最笨的方法哈哈哈

注意事项:

参考代码:

#include<iostream>
using namespace std;
int main(){
 int a,b;
 cin>>a>>b;
 if(a==0&&b==1)
 cout<<"-1";
 else if(a==0&&b==2)
 cout<<"1";
 else if(a==0&&b==0)
 cout<<"0";
 else if(a==1&&b==0)
 cout<<"1";
 else if(a==1&&b==1)
 cout<<"0";
 else if(a==1&&b==2)
 cout<<"-1";
 else if(a==2&&b==0)
 cout<<"-1";
 else if(a==2&&b==2)
 cout<<"0";
 else
 cout<<"1";
 return 0;
}

 

0.0分

1 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区