不查日历,10秒之内反应,今年2月有没有29号?

  • 主题发起人 主题发起人 ten
  • 开始时间 开始时间
能被 4 整除的年份并非都是闰年

有,一秒。因为好像能被四除的年分的就有。

能被 4 整除的年份并非都是闰年。判断闰年的依据如下。

(1) 能被 4 整除、并且不是 100 的整数倍的年份都是闰年,如2012 年;

(2) 能被 400 整除的年份都是闰年,如 2000 年;

(3) 其他年份都不是闰年, 如 1900 年和 2100 年。
 
能被 4 整除的年份并非都是闰年。判断闰年的依据如下。

(1) 能被 4 整除、并且不是 100 的整数倍的年份都是闰年,如2012 年;

(2) 能被 400 整除的年份都是闰年,如 2000 年;

(3) 其他年份都不是闰年, 如 1900 年和 2100 年。


惨了,CFC上能人太多。色拉丝刚把我砸了一棍,海牛又拍一砖。色拉条,海马等就别砸了,我真的不舒服了。
 
有29号怎样,没有又怎样。这是考智力那,考反应那,还是考瞎蒙的能力。
 
有29号怎样,没有又怎样。这是考智力那,考反应那,还是考瞎蒙的能力。

还是有一些知识的。色拉丝(不包含牛肚)和海牛(多牛的马甲:牛大了,是不是?)把脑细胞“同时能被4整除,不能被100整除,能被400整除,不能被4000整除” 的蜜方都供出来了,对村民不是有点教育吗?
 
还是有一些知识的。色拉丝(不包含牛肚)和海牛(多牛的马甲:牛大了,是不是?)把脑细胞“同时能被4整除,不能被100整除,能被400整除,不能被4000整除” 的蜜方都供出来了,对村民不是有点教育吗?





"同时能被4整除,不能被100整除,能被400整除,不能被4000整除"



听着象绕口令,我晕。有那天就过,没有就不过,不象有人生在那天,老惦记着啥时能庆生
 
"同时能被4整除,不能被100整除,能被400整除,不能被4000整除"


听着象绕口令,我晕。有那天就过,没有就不过,不象有人生在那天,老惦记着啥时能庆生


其实,把海牛牛人的调一下顺序,很容易记:
(1) 能被 400 整除的年份是闰年;
(2) 其余,能被 4 整除、但不能被 100 的整除的,也是闰年,
(3) 剩余都不是闰年。

和你类似,不记生日,也不在乎。胃“痛”时或嘴馋时,去撮一顿就是。别为难自己。
 
Gregorian calendar

In the Gregorian calendar, the current standard calendar in most of the world, most years that are evenly divisible by 4 are leap years. In each leap year, the month of February has 29 days instead of 28. Adding an extra day to the calendar every four years compensates for the fact that a period of 365 days is shorter than a solar year by almost 6 hours.

Some exceptions to this rule are required since the duration of a solar year is slightly less than 365.25 days. Years that are evenly divisible by 100 are not leap years, unless they are also evenly divisible by 400, in which case they are leap years.[2][3] For example, 1600 and 2000 were leap years, but 1700, 1800 and 1900 were not. Similarly, 2100, 2200, 2300, 2500, 2600, 2700, 2900 and 3000 will not be leap years, but 2400 and 2800 will be. Therefore, in a duration of two millennia, there will be 485 leap years. By this rule, the average number of days per year will be 365 + 1/4 − 1/100 + 1/400 = 365.2425, which is 365 days, 5 hours, 49 minutes, and 12 seconds. The Gregorian calendar was designed to keep the vernal equinox on or close to March 21, so that the date of Easter (celebrated on the Sunday after the 14th day of the Moon—i.e. a full moon—that falls on or after March 21) remains correct with respect to the vernal equinox.[4] The vernal equinox year is about 365.242374 days long (and increasing).

The marginal difference of 0.000125 days between the Gregorian calendar average year and the actual year means that, in 8,000 years, the calendar will be about one day behind where it is now. But in 8,000 years, the length of the vernal equinox year will have changed by an amount that cannot be accurately predicted (see below[vague]). Therefore, the current Gregorian calendar suffices for practical purposes, and the correction suggested by John Herschel of making 4000 a non-leap year will probably not be necessary.

Algorithm

Pseudocode to determine whether a year is a leap year or not in either the Gregorian calendar since 1582 or in the proleptic Gregorian calendar before 1582:

if year modulo 4 is 0
then
if year modulo 100 is 0
then
if year modulo 400 is 0
then
is_leap_year
else
not_leap_year
else is_leap_year
else not_leap_year


or as a boolean expression

is_leap_year = ( year modulo 4 is 0 ) and ( ( year modulo 100 is not 0 ) or ( year modulo 400 is 0 ) )
 
。。。。。
is_leap_year = ( year modulo 4 is 0 ) and ( ( year modulo 100 is not 0 ) or ( year modulo 400 is 0 ) )


Fortune? Basic? VB? Coble? C? C++? and Java? 当领导的就是英明。难怪都想当。
 
还是村长厉害,连编程都用上了。
 
后退
顶部