Initial commit

This commit is contained in:
2022-08-04 23:58:25 +02:00
commit ff1c36fc24
447 changed files with 9869 additions and 0 deletions

8
leap/src/lib.rs Normal file
View File

@@ -0,0 +1,8 @@
pub fn is_leap_year(year: u64) -> bool {
match (year % 400, year % 100, year % 4) {
(0, _, _) => true, // Is divisible by 400
(_, 0, _) => false, // Is divisible by 100 and 400
(_, _, 0) => true, // Is divisible by 4, 100 and 400
_ => false
}
}