判断输入的数是否为4的倍数并且除以2就行
2024-01-29 16:54:08
发布于:广东
102阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
if(n%4==0 and n/2 >0) cout<<"YES";
else cout<<"NO";
return 0;
}
全部评论 2
不需要n/2>0也能过
6天前 来自 上海
0n%4==0已经排除了分到0个糖的情况
6天前 来自 上海
0
有些帮助吧?
2024-01-25 来自 广东
0
















有帮助,赞一个