| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1020 人关注过本帖
标题:[求助]一道ACM题目
取消只看楼主 加入收藏
hacker168
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-10-18
收藏
 问题点数:0 回复次数:3 
[求助]一道ACM题目

Input


The input consists of T test cases. The number of T is given on the first line of the input file.Following T lines, which represent dates, one date per line. The format for a date is "month day" where month is a number between 1 (which indicates January) and 12 (which indicates December), day is a number between 1 and 31.All the date in the input are in 2006, you can assume that all the dates in the input are legal(合法).


Output


For each case, if the date is before Octorber 21st, you should print a number that between the date and Octorber 21st.If the day is beyond Octorber 21st, just print "What a pity, it has passed!".If the date is just Octorber 21st, print"It's today!!".

Sample Input


7
10 20
10 19
10 1
10 21
9 1
11 11
12 12
Sample Output


1
2
20
It's today!!
50
What a pity, it has passed!
What a pity, it has passed!

搜索更多相关主题的帖子: ACM 
2006-10-18 14:02
hacker168
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-10-18
收藏
得分:0 
二楼的,有点错误啊!最后结果中输9 1得出的结果应是50 ,而你的是51
2006-10-18 14:56
hacker168
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-10-18
收藏
得分:0 
不是啊,9月只有30天的
2006-10-18 15:09
hacker168
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-10-18
收藏
得分:0 

请问二楼的是否要考虑9月是30天,而8月是31天,这样算法就要改了

2006-10-18 15:31
快速回复:[求助]一道ACM题目
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.060798 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved