水题, 代码如下:
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int day = Integer.parseInt(br.readLine()); if (day <= 5) { System.out.print(day+2); } else if ( day>5 && day<=7) { if (day == 6) { System.out.print(1); } else { System.out.print(2); } } else { return; } } }