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