8 条题解
-
0
Guest
-
0
不难想到输入两数之间的差值若是一则有一种对应关系;同理就能写出差值为二与差值为零;就可以尽量少的分情况🎉️
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a>b) { if(a-b1) { cout<<"lose"<<endl; } if(a-b2) { cout<<"win"<<endl; } } else if(b>a) { if(b-a1) { cout<<"win"<<endl; } if(b-a2) { cout<<"lose"<<endl; } } else if(a==b) { cout<<"tie"<<endl; } return 0; }
- 1
信息
- ID
- 36
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 1
- 标签
- 递交数
- 121
- 已通过
- 84
- 上传者