题目https://www.luogu.com.cn/problem/P8665 输入处理: sc.nextInt() 读取测试用例数量 t。 sc.nextLine() 读取并丢弃剩余的换行符,避免影响后续输入。