Last active
January 29, 2022 01:13
-
-
Save youz/8e2296ce36087a6cc859f174315d187c to your computer and use it in GitHub Desktop.
FizzBuzz Golf in Common Lisp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; http://golf.shinh.org/p.rb?FizzBuzz#Common%20LISP | |
;; 80bytes | |
(dotimes(i 101)(format(> i 0)"~[~;~A~;~;Fizz~;~;Buzz~:;FizzBuzz~] | |
"(gcd i 15)i)) | |
;; 79bytes | |
(dotimes'101(format(> .'0)"~[~;~A~;~;Fizz~;~;Buzz~:;FizzBuzz~] | |
"(gcd .'15).'t)) | |
;; 79bytes | |
(dotimes(i 101)(format(> i 0)"~&~[~;~A~^~;~;Fi~;~;Bu~:;FizzBu~]zz"(gcd i 15)i)) | |
;; 77bytes (0B / 39B / 32B) | |
(dotimes(i 101)(format t"~[~;~A | |
~^~;~;Fi~;~;Bu~:;~v^FizzBu~]zz | |
"(gcd i 15)i)) | |
;; 77bytes (0B / 39B / 34B) | |
(dotimes(i 101)(format t"~&~[~;~A~^~;~;Fi~;~;Bu~:;~v^FizzBu~]zz"(gcd i 15)i)) | |
;; 77bytes (0B / 37B / 38B) | |
#-sbcl | |
(dotimes'101(format t"~&~[~;~A~:^~;~;Fi~;~;Bu~:;~v^FizzBu~]zz"(gcd .'15).'t)) | |
;; 77bytes (0B / 38B / 37B) | |
(dotimes'101(format t"~&~[~;~A~v^~;~;Fi~;~;Bu~:;~v^FizzBu~]zz"(gcd .'15).'0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment