杭电oj1308(What Day Is It?)
问题描述
输入年月日,判断是否为合法日期,并计算是星期几。
Input
The input will be a series of positive integers greater than zero, three integers per line, which represent dates, one date per line. The format for a date is ``month day year" where month is a number between 1 (which indicates January) and 12 (which indicates December), day is a number between 1 and 31, and year is positive number.
Output
The output will be the input date and name of the weekday on which the given date falls in the format shown in the sample. An invalid date or nonexistent date for the calendar used in the United States at the time should generate an error message indicating a invalid date. The input will end with three zeroes
Sample Input
11 15 1997
1 1 2000
7 4