import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int m = sc.nextInt();
for (int i = 0; i < m; i ++) {
int year = sc.nextInt();
int month = sc.nextInt();
int day = sc.nextInt();
//增加一天
LocalDate date = LocalDate.of(year, month, day).plus(1, ChronoUnit.DAYS);
//固定好输出的格式
System.out.println(date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
}
}
}
牛客.日期类
最新推荐文章于 2024-10-30 18:07:32 发布