Activity for trichoplax
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Question | — |
Round trip stones $N$ vessels initially contain $3$ stones each. What is the probability of having at least $3$ stones in the first vessel after moving a uniformly random selection from the first vessel to the second, then from the second vessel to the third, and so on back to the first vessel? Input - A positive ... (more) |
— | 6 days ago |
Article | — |
Round trip stones [FINALIZED] Now posted: Round trip stones $N$ vessels initially contain $3$ stones each. What is the probability of having at least $3$ stones in the first vessel after moving a uniformly random selection from the first vessel to the second, then from the second vessel to the third, and so on back to the ... (more) |
— | 8 days ago |
Question | — |
The 50 substrings that validate any string of Roman numerals Given a string of Roman numerals, decide whether it forms a valid Roman number. If not, output the substring that proves this, from the list of 50 strings described below. Relevant fact This challenge is based around the following fact: > A string of Roman numerals is a valid Roman number if a... (more) |
— | about 1 month ago |
Article | — |
The 50 substrings that validate any string of Roman numerals [FINALIZED] Now posted: The 50 substrings that validate any string of Roman numerals Given a string of Roman numerals, decide whether it forms a valid Roman number. If not, output the substring that proves this, from the list of 50 strings described below. Relevant fact This challenge is based around ... (more) |
— | about 1 month ago |
Question | — |
Leaderboard sorting bug The leaderboard that shows below a code golf challenge can either sort the answers to show the winner for each language separately (if "Group by language" is ticked) or it can show all the answers from all the languages sorted as a single list, to give an overall winner. There seems to be a bug in... (more) |
— | about 2 months ago |
Question | — |
Fibonacci without consecutive digits Output the Nth number in the list of Fibonacci numbers that have no consecutive digits. Input - A non-negative integer. Output - The Nth number in the list of Fibonacci numbers whose base 10 (decimal) representation has no adjacent digits that are consecutive. - The Fibonacci numbers start w... (more) |
— | about 2 months ago |
Article | — |
Fibonacci numbers with no consecutive digits [FINALIZED] Now posted: Fibonacci without consecutive digits Output the Nth number in the list of Fibonacci numbers that have no consecutive digits. Input - A non-negative integer. Output - The Nth number in the list of Fibonacci numbers whose base 10 (decimal) representation has no adjacent digit... (more) |
— | 2 months ago |
Question | — |
Plain black webpage This is a language specific challenge, for HTML only. Your answer is the content of a self contained HTML file, that when opened in a web browser gives a plain black page. Requirements - The HTML file is self contained. You may use CSS, JS, WASM, or images only if they are contained within ... (more) |
— | 3 months ago |
Question | — |
Shortest representation in generalised Roman numerals Find the shortest representation of an integer in generalised Roman numerals. Since there is more than one way to generalise, only the following definition applies to this challenge. Definition The digits used are the same as standard Roman numerals: Digit|Value |----: I|1 V|5 X|10 L|50 C|10... (more) |
— | 6 months ago |
Question | — |
Single digit Roman numeral Given a single character, which is a valid Roman numeral, output its value. Values There are 7 valid single character Roman numerals, with the following values: Character | Value | ----: I | 1 V | 5 X | 10 L | 50 C | 100 D | 500 M ... (more) |
— | 6 months ago |
Article | — |
Single character Roman numeral [FINALIZED] Now posted: Single digit Roman numeral Given a single character, which is a valid Roman numeral, output its value. Values There are 7 valid single character Roman numerals, with the following values: Character | Value | ----: I | 1 V | 5 X | 10 L | 50... (more) |
— | 6 months ago |
Question | — |
Borromean coprimes Given 3 positive integers, indicate whether they are Borromean coprimes. Definition 3 positive integers are called Borromean coprimes if both of the following are true: - Their greatest common divisor is 1. - The greatest common divisor of every pair is greater than 1. In summary, the triple... (more) |
— | 6 months ago |
Article | — |
Borromean coprimes [FINALIZED] Now posted: Borromean coprimes Given 3 positive integers, indicate whether they are Borromean coprimes. Definition 3 positive integers are called Borromean coprimes if both of the following are true: - Their greatest common divisor is 1. - The greatest common divisor of every pair is gre... (more) |
— | 7 months ago |
Question | — |
Word suggesting Suggest a word from a word list, given a string. Motivation Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At first the suggested word is simply the first word in the word list that matches, but once a word has been suggested it is assumed that... (more) |
— | 8 months ago |
Question | — |
A random button for ordering Code Golf post lists On most Codidact communities the posts list has a "Random" button among the sorting buttons: The sorting buttons on Codidact Meta - "Activity", "Age", "Score", and "Random" The only exceptions are the Codidact Proposals community, and Code Golf: The sorting buttons on Code Golf - "Activity",... (more) |
— | 9 months ago |
Question | — |
Probability of rolling all 6 dice faces The probability of rolling every number from 1 to 6 with $N$ six-sided dice. Input - A positive integer $N$. - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs. Output - A probability, $0 \le p \le 1$ - This is the proba... (more) |
— | 10 months ago |
Question | — |
Expected value of highest dice rolled You roll $N$ six-sided dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score? Input - A positive integer $N$. - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect... (more) |
— | 10 months ago |
Article | — |
Probability of rolling all 6 dice faces [FINALIZED] Now posted: Probability of rolling all 6 dice faces The probability of rolling every number from 1 to 6 with $N$ six-sided dice. Input - A positive integer $N$. - Your code must work for inputs up to and including 10, but may crash, error, or give incorrect output for larger inputs. Ou... (more) |
— | 10 months ago |
Article | — |
Expected value of highest dice rolled [FINALIZED] Now posted: Expected value of highest dice rolled You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) of your score? Input - A positive integer $N$. - Your code must work for inputs up to and includ... (more) |
— | 10 months ago |
Article | — |
A word suggester [FINALIZED] Now posted: Word suggesting Suggest a word from a word list, given a string. Motivation Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At first the suggested word is simply the first word in the word list that matches, but once a word ha... (more) |
— | 10 months ago |
Question | — |
Label a hinged tetromino Given a hinged tetromino, give it a unique, consistent label independent of location, rotation, and reflection. Tetrominoes A [tetromino] is a connected subset of the square tiling, composed of 4 squares, where connection can only be edge connection. Here are the 5 tetrominoes: ![the 5 tetr... (more) |
— | 10 months ago |
Article | — |
Label the hinged tetrominoes - [FINALIZED] Now posted: Label a hinged tetromino Given a hinged tetromino, give it a unique, consistent label. Tetrominoes A [tetromino] is a connected subset of the square tiling, composed of 4 squares, where connection can only be edge connection. Here are the 5 tetrominoes: ![the 5 tetrominoe... (more) |
— | 10 months ago |
Question | — |
Hosting fastest code challenges When posting a fastest-code challenge, what do I need to bear in mind? Unlike with code-golf challenges, where the score is simply the number of bytes in the source code, for a fastest-code challenge the time taken to run will be different on different machines. What options are there for defining... (more) |
— | about 1 year ago |
Answer | — |
A: How should we handle incorrect answers? Respect both sides We should consider how an approach would affect the poster of the incorrect answer, and how it would affect the posters of correct answers. Correct answers In general, allowing an incorrect answer to remain leaves some or all of the correct answers lower in the automated per l... (more) |
— | about 1 year ago |
Article | — |
Shortest representation in generalised Roman numerals [FINALIZED] Posted Given an integer, find its shortest representation in generalised Roman numerals. Since there is more than one way to generalise, only the definition shown below applies to this challenge. Definition The digits used are the same as for standard Roman numerals, with the same values: Dig... (more) |
— | over 1 year ago |
Question | — |
Digit antitranspose Convert a matrix or grid of digits to its antitranspose. For a square matrix , this is its reflection in its antidiagonal. More generally, for a rectangular matrix, this is its reflection in its skew diagonal. Less formally, the line to reflect in is from South West to North East, at 45 degrees re... (more) |
— | over 1 year ago |
Question | — |
Encode with ROT13.5 Given a string, convert all of its letters using ROT13, and all of its digits using ROT5. This is sometimes referred to as ROT13.5. Input - A sequence of printable ASCII characters (character codes 32 to 126 inclusive) - This may be a string or any data structure of characters Output - A seq... (more) |
— | over 1 year ago |
Article | — |
Digit antitranspose [FINALIZED] Now posted: Digit antitranspose Convert a matrix or grid of digits to its antitranspose. For a square matrix , this is its reflection in its antidiagonal. More generally, for a rectangular matrix, this is its reflection in its skew diagonal. Less formally, the line to reflect in is from Sou... (more) |
— | over 1 year ago |
Article | — |
Encode with ROT13.5 [FINALIZED] Now posted: Encode with ROT13.5 Given a string, convert all of its letters using ROT13, and all of its digits using ROT5. This is sometimes referred to as ROT13.5. Input - A sequence of printable ASCII characters (character codes 32 to 126 inclusive) - This may be a string or any data str... (more) |
— | over 1 year ago |
Answer | — |
A: Knight safe squares Rust, 236 184 166 142 bytes ```rust |i:u64|{let s=0x101010101010101;let(a,b,c,d)=(i&252s,i&254s,i&127s,i&63s);(i|a>6|c>>15|b>>17|a>>10).countzeros()} ``` All test cases on Rust Playground Takes input as a 64 bit unsigned integer where each 1-bit represents a knight and each 0-bit represent... (more) |
— | over 1 year ago |
Question | — |
Sort letters by height Given a sequence of lower case letters, sort them into order of height. Heights The heights of letters are dependent on font, so for this challenge the height order to be used is as defined below: ```text acemnorsuvwxz t i bdfghklpqy j ``` Letters on the same line are defined to be ... (more) |
— | over 1 year ago |
Article | — |
Sort letters by height [FINALIZED] Now posted: Sort letters by height Given a sequence of lower case letters, sort them into order of height. Heights The heights of letters are dependent on font, so for this challenge the height order to be used is as defined below: ```text acemnorsuvwxz t i bdfghklpqy j ``` L... (more) |
— | over 1 year ago |
Question | — |
Connect the corners without 4 in a row Connect opposite corners of a rectangle of characters without putting 4 characters in a row. Input - Two numbers, W and H, representing the width and height of the rectangle - Each number will be in the range 2 to 70 Output - A rectangular grid of characters, of width W and height H - You m... (more) |
— | over 1 year ago |
Question | — |
Circle of text characters Given a radius R, output a text representation of a circle. Input - A positive integer R (strictly greater than zero) - You do not need to handle values of R greater than 32 Output - A square grid of characters of side length 2R + 1 - You may choose any 2 distinct characters to represent th... (more) |
— | over 1 year ago |
Question | — |
Pinwheel words Given a word that can be rotated by 180 degrees (a half turn) about at least one of its 3 axes and continue to be composed of English alphabet letters, output one of its rotated forms. The 3 rotation types will be given the challenge-specific names clock, mirror, and lake rotations. They have more... (more) |
— | over 1 year ago |
Answer | — |
A: Thoughts on hiding challenge sections with expandable details tags Since the examples I've given in the question are deliberately brief, they don't demonstrate the benefit of hiding a large block of text. I'm giving an example in this answer of one of my own challenges where I have used expandable `` sections to hide parts of the challenge wording that might be seen... (more) |
— | over 1 year ago |
Question | — |
Thoughts on hiding challenge sections with expandable details tags I've recently started experimenting with hiding some of the sections in a challenge, using an expandable `` tag. This seems to have some advantages, but I'm interested to hear how people find this - any good and bad points and general advice on how and where to use this. I'm asking this in the con... (more) |
— | over 1 year ago |
Article | — |
Pinwheel words [FINALIZED] Now posted: Pinwheel words Given a word that can be rotated by 180 degrees (a half turn) about at least one of its 3 axes and continue to be composed of English alphabet letters, output one of its rotated forms. The 3 rotation types will be given the challenge-specific names clock, mirror, ... (more) |
— | over 1 year ago |
Article | — |
Arbitrary angle wrapping wordsearch Sandbox - Would you change anything about the test case format? - Are there any more edge cases to add to the test cases? - Should words that use the same grid position more than once be considered present? (Currently I am leaning towards allowing this, which I imagine is the easier approach to im... (more) |
— | over 1 year ago |
Question | — |
Lowercase, but not just the letters Given a string of printable ASCII characters, convert them all to lowercase, except not just the letters. ASCII characters that are letters have a bit in their binary representation that is `0` for uppercase, and `1` for lower[]()case. Setting this bit to `1` for a non-letter character that previo... (more) |
— | over 1 year ago |
Question | — |
Mediocre pop count Given a sequence of letters, omit those with the highest or lowest pop count. Terminology The pop count or [population count] of a binary string is the number of `1`s in it. For this challenge, the pop count of a letter is the number of `1`s in its ASCII character code in binary. For exampl... (more) |
— | over 1 year ago |
Question | — |
Just the vowels please Given a sequence of letters, output only the vowels. Input - A sequence of letters - This may be a string or any ordered data structure of characters (provided it is consistent between inputs) - The letters may contain a mixture of upper and lower case - The characters that count as letters fo... (more) |
— | over 1 year ago |
Article | — |
Lowercase, but not just the letters [FINALIZED] Now posted: Lowercase, but not just the letters Given a string of printable ASCII characters, convert them all to lowercase, except not just the letters. ASCII characters that are letters have a bit in their binary representation that is `0` for uppercase, and `1` for lower[]()case. Setting... (more) |
— | over 1 year ago |
Question | — |
Balanced quinary quasiquine Given an integer $N$ in balanced quinary, output the first $N$ characters of your source code if $N$ is positive, or the last $-N$ characters of your source code if $N$ is negative. Terminology Quinary Standard quinary (base $5$) has digits $0, 1, 2, 3, 4$. In a quinary number a digit $n$ plac... (more) |
— | over 1 year ago |
Article | — |
Mediocre pop count [FINALIZED] Now posted: Mediocre pop count Given a sequence of letters, omit those with the highest or lowest pop count. Terminology The pop count or [population count] of a binary string is the number of `1`s in it. For this challenge, the pop count of a letter is the number of `1`s in its ASCII c... (more) |
— | over 1 year ago |
Article | — |
Just the vowels please [FINALIZED] Now posted: Just the vowels please Given a sequence of letters, output only the vowels. Input - A sequence of letters - This may be a string or any ordered data structure of characters - The letters may contain a mixture of upper and lower case - The characters that count as letters for... (more) |
— | over 1 year ago |
Answer | — |
A: Tips for [fastest-code] in Python If you're not required to use the standard cpython implementation of python, you can usually get a significant speed increase by running your code with PyPy. (more) |
— | over 1 year ago |
Article | — |
Circle of text characters [FINALIZED] Now posted: Circle of text characters Given a radius R, output a text representation of a circle. Input - A positive integer R (strictly greater than zero) - You do not need to handle values of R greater than 32 Output - A square grid of characters of side length 2R + 1 - You may cho... (more) |
— | over 1 year ago |
Article | — |
Connect the corners without 4 in a row [FINALIZED] Now posted: Connect the corners without 4 in a row Connect opposite corners of a rectangle of characters without putting 4 characters in a row. Input - Two numbers, W and H, representing the width and height of the rectangle - Each number will be in the range 2 to 70 Output - A rectan... (more) |
— | over 1 year ago |
Answer | — |
A: 55 fruit salad: choose your own Kolmogorov complexity [Python 3], 319 318 bytes ```python print('riBfig,barBbilBdewBmulBtayBabiu,bael,date,lime,lulo,neem,noni,pear,pili,plum,rimu,sloe,sorb,yuzu,bearBblueBcranBcrowBemu BhackBjuneBlimeBpineBraspBwineBwolfByew Backee,akebi,apple,araza,cacao,caqui,carob,etrog,gấc,grape,guava,ilama,jagua,kokum,kubal,lemo... (more) |
— | over 1 year ago |