Posts by trichoplax
I wrote a code golf answer which depends on setting an environment variable before running the code. I've assumed that the bytes used to define the environment variable should be added to the score...
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...
Rust, 325 bytes A closure (anonymous function) returning true for a net, or false otherwise. |s|"83e423a313e423e8c1a383e213e823e143e223e443e441ec83a313e233a831acc1e223e233a421ec83e81fcc1e111ecc1e...
The automated leaderboard for each challenge previously showed the username for each answer row, but now it does not. I'm guessing a recent change to page layout has caused the JavaScript that gene...
Yes, it has already been decided There was discussion of this previously in Should [code-golf-tips] be replaced with [tips] + [code-golf]? and there is clear consensus there that the preferred tag...
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...
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...
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 ...
Does a number have balanced numbers of distinct digits? That is, do the number's digits appear with equal frequency? Input A positive integer N. N will have no leading zeroes. Output An ...
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...
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...
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...
- ← Previous
- 1
- 2
- 3
- 4
- 5
- Next →