各位大佬,帮忙看看为什么只有90分?

tctm34 2022-08-27 20:46:52 2023-09-10 14:14:07 1
{{ vote && vote.total.up }}

共 4 条回复

root 站长

2是不能切成两个偶数的,大兄弟!!!

hebaijun

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n==0){ cout<<"NO, you can't divide the watermelon into two even parts."; }else if(n==2)cout<<"NO, you can't divide the watermelon into two even parts.";else if(n%2==0)cout<<"YES, you can divide the watermelon into two even parts.";else cout<<"NO, you can't divide the watermelon into two even parts."; return 0; }//0和2要考虑进去

tctm34

还是不对

root 站长

偶数里面有一个非常特殊的偶数, 2 !