sc=scanner.nextLine();不能放在其他scanner.nextInt()后面,因为会导致读取/n,导致后面的读取错误 正确姿势: sc=scanner.nextLine(); sc=scanner.nextLine();