参考代码:
import java.util.Scanner; import java.time.LocalDate; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int year = scanner.nextInt(); int month = scanner.nextInt(); int day = scanner.nextInt(); LocalDate date = LocalDate.of(year, month, day); System.out.print(date.getDayOfWeek().getValue()); } }
0.0分
5 人评分