| 比赛 | 2026初中综合小练习 | 评测结果 | WWWWWWWWWW |
|---|---|---|---|
| 题目名称 | 传球游戏 | 最终得分 | 0 |
| 用户昵称 | cyk | 运行时间 | 0.028 s |
| 代码语言 | C++ | 内存使用 | 3.65 MiB |
| 提交时间 | 2026-04-14 20:45:08 | ||
#include <bits/stdc++.h>
using namespace std;
int main(){
freopen("ballg.in","r",stdin);
freopen("ballg.out","w",stdout);
int n,m;
cin>>n>>m;
if(n==m){
if(n%2==0){
cout<<4;
}else{
cout<<2;
}
}else if(n<m){
if(n%2==0&&m-n==1){
cout<<0;
}else if(n%2==1&&m-n==1){
cout<<2;
}
}
return 0;
}