题解 | #牛牛的计划#

牛牛的计划

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");
        }
    }
}

全部评论

相关推荐

点赞 评论 收藏
分享
02-10 21:39
Java
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务