题解 | #牛牛的计划#

牛牛的计划

http://www.nowcoder.com/practice/cf956ceef9f84f7393a0b7284fdbf95a

import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int y = scanner.nextInt();
        int m = scanner.nextInt();
        int d = scanner.nextInt();
        int y1 = scanner.nextInt();
        int m1 = scanner.nextInt();
        int d1 = scanner.nextInt();
        if(y < y1){
            System.out.print("yes");
        }else if(y == y1){
            if(m < m1){
                System.out.print("yes");
            }else if(m == m1){
                if(d <= d1){
                    System.out.print("yes");
                }else{
                    System.out.print("no");
                }
            }else{
                System.out.print("no");
            }
        }else{
            System.out.print("no");
        }
    }
}

全部评论

相关推荐

07-01 17:14
中北大学 Java
兄弟们是真是假
牛客46374834...:我在boss上投java岗从来没成功过
点赞 评论 收藏
分享
06-10 21:15
门头沟学院 Java
宁阿:好多这种没🧠的公司,他们估计都不知道毕业的人不能给安排实习岗
实习吐槽大会
点赞 评论 收藏
分享
05-29 09:02
门头沟学院 Java
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务