题解 | #四季#
四季
http://www.nowcoder.com/practice/eaf21203b61b4a689987fdc165d00dfc
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str=sc.nextLine(); String mm=str.substring(4,6); Integer MM=Integer.parseInt(mm); if(3<=MM&&MM<=5) { System.out.println("spring"); }else if(6<=MM&&MM<=8) { System.out.println("summer"); } else if(9<=MM&&MM<=11) { System.out.println("autumn"); } else if(MM==12||MM==1||MM==2) { System.out.println("winter"); } } }