#include <bits/stdc++.h> int main() {     int weight,flag = 0;     scanf("%d",&weight);     for(int i = 2;i < weight;i = i + 2)     {         for(int j = 2;j < weight;j = j + 2)         {             if(i + j == weight)             {                 flag = 1;                 break;             }         }     }     if(flag)         printf("YES, you can divide the watermelon into two even parts.");     else         printf("NO, you can't divide the watermelon into two even parts.");     return 0; }
点赞 2

相关推荐

牛客网
牛客企业服务