import java.time.*; public class Main { public static void main(String[] args) throws Exception { int ans = 0; LocalDate start = LocalDate.of(2015, 1, 1); LocalDate end = LocalDate.of(2016, 1, 1); while (start.isBefore(end)) { int m = start.getMonthValue(); int d = start.getDayOfMonth(); //System.out.println(m+"月"+d+"日"); if (m == d / 10 + d % 10) ans++; start = start.plusDays(1); } System.out.println(ans); } }