season
Submit solution
Points:
10
Time limit:
1.0s
Memory limit:
64M
Authors:
Problem type
Allowed languages
Java 19, Java 8
Description
輸入一個「正整數」(代表月份),
程式會根據輸入的月份輸出對應的「季節」。
若輸入的月份不在 1 到 12 之間,則顯示"This is not a valid month."。
季節對照表
月份 | 季節 |
---|---|
12、1、2 | Winter |
3、4、5 | Spring |
6、7、8 | Summer |
9、10、11 | Autumn |
Sample input & output
Input #1
2
Output #1
Winter
Input #2
77777
Output #2
This is not a valid month.
Comments