func is_leap_year(year)
return (year MOD 4) XOR (year MOD 100) XOR (year MOD 400)
MOD
is modulo, and XOR
is exclusive or.Posted at 2012-01-10 12:31:39 | Updated at 2018-03-28 13:06:57
func is_leap_year(year)
return (year MOD 4) XOR (year MOD 100) XOR (year MOD 400)
MOD
is modulo, and XOR
is exclusive or.Back to Bit Focus | |
NijiPress - Copyright (C) Neuron Teckid @ Bit Focus | |
About this site |