题解 | #吃瓜群众#

吃瓜群众

https://ac.nowcoder.com/acm/problem/22014

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int weight = 0;
        while (scanner.hasNext()) {
            weight = scanner.nextInt();
        }
        if (weight % 2 == 0 && weight > 2) {
            System.out.println("YES, you can divide the watermelon into two even parts.");
            
        } else {
            System.out.println("NO, you can't divide the watermelon into two even parts.");
        }
    }
}
全部评论

相关推荐

点赞 评论 收藏
分享
10-25 23:12
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务