杭电oj1308(What Day Is It?)

该博客介绍了杭电oj1308题目,内容包括输入输出格式、样例及解题关键,特别是1752年9月历法变更的影响,需要考虑日期的有效性和计算星期的方法。
摘要由CSDN通过智能技术生成

杭电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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值