超级菜鸟的算法问题
cssin 2001-07-30 02:09:55 有一道题目是求复活节的日期的,可是他的公式我看不懂,哪位大虾帮帮忙:
You can compute the date for any Easter Sunday from 1982 to 2048 as follows(all variables are of type int):
a is year % 19
b is year % 4
c is year % 7
d is (19 * a + 24) % 30
e is (2 * b + 4 * c + 6 * d + 5) % 7
Easter Sunday is March(22 + d + e)
输入1985的得到的结果是1985年4月7日.