This comment is reply for 5337 にしお: とても素朴な書き方。剰余の計算を禁止して...(除算・余剰を使わずに閏年). Go to thread root.
にしお #5342(2008/01/16 02:23 GMT) [ Python ] Rating1/1=1.00
ついにゅっとなってやってしまった。
1 2 3 4 5 6 7 8 9 10
def leap(x, d=400): return ( not d and [d] or x == 0 and [[1, 0, 1][d >> 6 & 3]] or x < d and [leap(x, [0, 4, 100][d >> 6 & 3])] or [leap(x - d, d)] )[0]
Rating1/1=1.00-0+
[ reply ]
にしお
#5342()
[
Python
]
Rating1/1=1.00
ついにゅっとなってやってしまった。
Rating1/1=1.00-0+