
日期
guojiaqi007
这个作者很懒,什么都没留下…
展开
-
九度 oj 题目1096:日期差值
http://ac.jobdu.com/problem.php?pid=1096 计算每个日期的总日子,然后相减。 #include static int days = 365; static int month[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 }; int leap(int year){ if(!原创 2017-02-06 09:17:37 · 237 阅读 · 0 评论 -
九度 oj 题目1043:Day of Week
http://ac.jobdu.com/problem.php?pid=1043 有两种做法: 一公式法:如code1。编码简单,但是在九度上不能ac。 二比较法:如code2,比较今天和目标时间的差,推算目标时间的星期。 code1: #include #include static const char* month [] { "","January", "原创 2017-02-06 14:52:10 · 257 阅读 · 0 评论