Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
4
Task/Leap-year/Clojure/leap-year-1.clj
Normal file
4
Task/Leap-year/Clojure/leap-year-1.clj
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(defn leap-year? [y]
|
||||
(and (zero? (mod y 4))
|
||||
(or (pos? (mod y 100))
|
||||
(zero? (mod y 400)))))
|
||||
6
Task/Leap-year/Clojure/leap-year-2.clj
Normal file
6
Task/Leap-year/Clojure/leap-year-2.clj
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(defn leap-year? [y]
|
||||
(condp #(zero? (mod %2 %1)) y
|
||||
400 true
|
||||
100 false
|
||||
4 true
|
||||
false))
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
(defn leap-year? [y]
|
||||
(and (zero? (mod y 4)) (or (pos? (mod y 100)) (zero? (mod y 400)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue