Search
Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the conventional ordinal names. Input A positive integer from the te...
Lean 4, 39 bytes def x(i:String):String:=s!"Hello, {i}!" Try it online! (Note that TIO only supports Lean 3, so I sadly am unable to use a link from there.)
Avoid assignment & semicolon of unnamed closure Closure (15 bytes) If you need to call a closure using it's name (such as if it is recursive) then you need the bytes required to assign it to ...
Replace reduce with fold Unlike some languages, Rust's reduce returns an Option, requiring additional bytes to unwrap the output. However, Rust's fold does not. If you can find a suitable neutral...
Rust, 325 bytes A closure (anonymous function) returning true for a net, or false otherwise. |s|"83e423a313e423e8c1a383e213e823e143e223e443e441ec83a313e233a831acc1e223e233a421ec83e81fcc1e111ecc1e...
Python 3 + PYTHONHASHSEED=764, 193+18=211 bytes This doesn't work with Python's default settings, because for security reasons hash gives different results for the same input on different runs. It...
On Codidact Meta, it looks like there have been improvements to the User Abilities help page, fixing some typos and adding an extra explanatory section. These improvements have not been applied to ...
Two types of popularity contest I'd like to see popularity contests posted, as a way of measuring how well they fit this community. I want to see what problems arise so we can decide how to mitiga...
AWK, 48 bytes ORS="";{l=split($0,d,"");for(;l>0;)print d[l--]} Try it online!
AWK, 26 24 bytes END{for(;;)print x=x"*"} Try it online!
K (oK), 15 bytes "Hello, World!" Try it online! I'm terrible at K, but I've got that one down now.
AWK, 2 bytes $0 Try it online! END{print "Hello, World!"}
Google Sheets, 155 bytes =regexextract(A1,"CCCC|CC[DM]|CM[CDM]|DC[DM]|DD|DM|I[CDLM]|IIII|II[VX]|IVI|IX[CILVX]|L[CDLM]|LX[CL]|MMMM|V[CDLMVX]|VI[VX]|XCC[DLMX]|XD|XLX|XM|XX[CL]|XXXX") The same reg...
JavaScript, 149 bytes t=>t.match(/CCCC|CC[DM]|CM[CDM]|DC[DM]|DD|DM|I[CDLM]|IIII|II[VX]|IVI|IX[CILVX]|L[CDLM]|LX[CL]|MMMM|V[CDLMVX]|VI[VX]|XCC[DLMX]|XD|XLX|XM|XX[CL]|XXXX/) Simple regex. Retu...
AWK, 62 61 60 56 bytes {for(;i++<$1;)print i%3?i%5?i:y="Buzz":i%5?x="Fizz":x y} {for(;i++<$0;)print i%15?i%5?i%3?i:"Fizz":"Buzz":"FizzBuzz"} {for(;i++<$0;x=""){i%3||x="Fizz";i%5||x=...
Rust, 35 bytes |n:f64|(12.*n-3.).sqrt().fract()>0. Counterintuitively, this outputs false for a hex number, and true otherwise, but this is consistent with the output requirement: One o...
Currently the maximum number of characters for a Codidact post is 30,000. However, at some point this may be configurable per community (or perhaps per category). There is a GitHub issue for Config...
Given a positive integer, indicate whether it is the product of its proper divisors. Integers equal to the product of their proper divisors can be found on the Online Encyclopedia of Integer Seque...