import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) throws NumberFormatException, ParseException { Scanner sc = new Scanner(System.in); //入力 String m = sc.next(); String d = sc.next(); int k = Integer.parseInt(sc.next()); List list = new ArrayList<>(); for(int i=0;i<10;i++) { list.add(false); } sc.close(); List week = new ArrayList<>(); //日付生成 Calendar c = Calendar.getInstance(); SimpleDateFormat df = new SimpleDateFormat("MM/dd"); SimpleDateFormat tmp = new SimpleDateFormat("yyyy-MM-dd"); Date date= tmp.parse(LocalDate.of(2022, Integer.parseInt(m),Integer.parseInt(d)).toString()); c.setTime(date); week.add(df.format(c.getTime())); for(int i = 1;i <= 6;i++) { c.add(Calendar.DAY_OF_MONTH, 1); week.add(df.format(c.getTime())); } for(String day : week) { for(int i=0;i= k)? "Yes" : "No"); } }