instruction_seed stringlengths 29 40.5k | source stringclasses 6
values |
|---|---|
\$T(n, k)\$ denotes the number of permutations of length \$n\$ with a maximum of \$k\$ inversions. This function exhibits rapid growth; for instance, \$T(20, 100) = 1551417550117463564\$. The upper bound for possible inversions is \$n\frac{n-1}{2}\$, implying that for \$k = n\frac{n-1}{2}\$, we ascertain \$T(n, k) = n!... | evolcodegolf |
Your objective is to generate a representation of a spaceship composed of a specified size n, including various firearms or guns, alongside n distinct bullets represented by the character - (with spaces inserted between each bullet) for each firearm.
To comply with the outlined stipulations:
- When n is an odd integ... | evolcodegolf |
Gray Code is a unique number system wherein only a single bit changes between consecutive values. Generate and display the 8-bit Gray Code representations corresponding to decimal values ranging from 0 to 255, while ensuring that your solution is not only concise but also adheres to optimal coding practices. Shortest C... | evolcodegolf |
Who are they?
Primus-Orderus Primes (POP) are primes which contain their order in the sequence of primes.
So the nth prime, in order to be POP, must contain all the digits of n in a certain way which I'll explain.
Examples
Let's get things clearer:
All digits of n must appear among the digits of POP in the sa... | evolcodegolf |
Background
You awake to find yourself lost in a one-dimensional labyrinth! A mystical genie (or something) appears and explains that the exit lies in front of you, but that between you and the exit is a series of challenges. As you wander forward, you realize that all of the so-called challenges are merely locked doo... | evolcodegolf |
The Tabula Recta, often referred to as a 'Vigenere Table', was meticulously devised by the notable figure Johannes Trithemius and has found application across various cryptographic systems, including all iterations of Bellaso's Vigenere cipher along with the Trithemius cipher itself. This intricate table appears as fol... | evolcodegolf |
Part of the Advent of Code Golf 2021 event. For comprehensive details, refer to the linked meta discussion.
The narrative unfolds from the conclusion of AoC2018 Day 7, Part 2.
Why I am pxeger, contrasting with Bubbler.
Upon successfully assembling the Sleigh kit alongside several Elves, you unexpectedly discover a... | evolcodegolf |
In the realm of number theory, consider two functions \$f, g\colon \mathbb{Z}_{\geq 1} \to \mathbb{R}\$. The Dirichlet convolution, denoted as \$ (f*g)(n) = \sum_{d|n}f(d)g(n/d)\$, provides a unique structure to this mathematical landscape. The question pertains to the computation of the Dirichlet convolution of these ... | evolcodegolf |
Background
Link-a-Pix is a puzzle on a rectangular grid, where the objective is to reveal the hidden pixel art by the following rules:
Connect two cells with number N with a line spanning N cells, so that the two cells are at the two ends of the line.
The number 1 is considered connected to itself (which makes it ... | evolcodegolf |
Given a string that may or may not be enclosed in a decorative frame, perform a toggle action on the box. The clarity of this operation is further exemplified in the provided test cases and accompanying explanations.
Input / Output
Input Format
The input can either be represented as a singular string delineated by car... | evolcodegolf |
Challenge
Given a positive integer, return the product of its divisors, including itself, while ensuring your solution operates within a time complexity of O(n log n) or better. This is sequence A007955 in the OEIS.
Test Cases
1: 1
2: 2
3: 3
4: 8
5: 5
6: 36
7: 7
8: 64
9: 27
10: 100
12: 1728 ... | evolcodegolf |
A shape's surface area is the measure of how much exposed two-dimensional space that shape presents.
Challenge
Given six integers: [L, W, H] representing the length, width, and height of a rectangular prism, and [l, w, h] representing the length, width, and height of a smaller rectangular prism.
You will need to calcu... | evolcodegolf |
Design a program that constructs a bowl of alphabet soup—an approximately circular ASCII-art shape featuring the 26 uppercase English letters (A-Z) organized in a clockwise fashion around the perimeter, as exemplified below:
XYZABC
VW DE
U F
T G
S H
RQ JI
PONMLK... | evolcodegolf |
Kirchhoff's law posits that the algebraic sum of all currents at a junction—considered positive for currents directed towards the junction and negative for those departing—will invariably equate to zero. Examine the diagram below:
By applying Kirchhoff's law, we observe that i1 + i4 - i2 - i3 = 0, which leads to the c... | evolcodegolf |
Given a three-line string representation of a structure, your task is to analyze its stability and determine whether it tilts to the left, achieves a state of balance, or tips to the right.
Input structure:
Imagine the structure as a metal rod with various weights positioned on top, all balanced upon a central vertic... | evolcodegolf |
A prime knot is defined as a non-trivial knot that cannot be expressed as the knot sum of two non-trivial knots.
Understanding knot sums involves placing two knots side by side and connecting them with two lines to a common strand on either side, before removing the segment between the lines. This results in a new kn... | evolcodegolf |
Compose a function or an entire program that meticulously generates and outputs the intricate ASCII art shown below, ensuring to follow the specific formatting requirements while implementing a multi-step reasoning process to tackle potential edge cases and variations in spacing:
Output:
1
... | evolcodegolf |
Meta discussion: Could it be considered that the statement "(The other day) I encountered a bear" is merely a reiteration of a previous assertion?
Your challenge is to output this text:
The other day,
The other day,
I met a bear,
I met a bear,
A great big bear,
A great big bear,
Oh way out there.
Oh way out there.
Th... | evolcodegolf |
The utility program for the puppy takes a specified filename as input and performs an action that closely resembles what one might expect from a puppy: it effectively shreds the contents of the file!
Detailed Steps for Shredding
1. Utilize your teeth to rip out the pages. Begin by splitting the input file into lines ... | evolcodegolf |
A frog sits contemplatively on a lily pad, yearning to traverse to the opposite bank of the river. Scattered between the frog and the river's edge are a series of lily pads of diverse sizes; these larger lily pads enable the frog to achieve greater jump distances compared to their smaller counterparts. In addition to r... | evolcodegolf |
"Counter" represents a specialized programming language that I have devised for the purposes of addressing the following inquiries.
Rules
Commands are interpreted sequentially from left to right, commencing with the initial character.
Each command can either be executed as it is interpreted or deferred for collecti... | evolcodegolf |
Design an interactive dice game that simulates a two-player competition:
The game alternates between players, with each player rolling two six-sided dice per turn. The goal is to accumulate points over multiple rounds.
Rules:
- Each die roll results in a score equal to its face value.
- If a player rolls doubles, the... | evolcodegolf |
Design a piece of software that generates a haiku, and when executed, displays a haiku.
By "haiku" I mean:
3 lines
The first line contains 5 syllables, the second line has 7 syllables, and the final line returns to 5 syllables.
Artistic interpretation of nature is encouraged. The most creative submissions will ... | evolcodegolf |
Introduction
One of the fundamental concepts I encountered in the realm of organic chemistry was articulating the stoichiometric equation for the exothermic reaction involving the combustion of alkanes. The quintessential illustration can be denoted as: 2CH4 + 4O2 -> 4H2O + 2CO2. It is important to note that this equ... | evolcodegolf |
The challenge involves the detailed interpretation of the stack-based programming language known as underload. This language operates on a stack composed exclusively of strings, which can be concatenated in various manners. Each program written in underload consists of a specific sequence of instructions defined as fol... | evolcodegolf |
Some background
In mathematics, a group is defined as a tuple \$(G, *)\$ where \$G\$ represents a set and \$*\$ denotes an operation on \$G\$ that satisfies the requirement that for any two elements \$x, y \in G\$, the result of the operation \$x * y\$ must also belong to \$G\$.
For specific elements \$x,y,z\in G\$... | evolcodegolf |
Transform the provided HTML structure into a mountain representation, ensuring to adhere to multi-step reasoning throughout the process. To illustrate, consider how HTML indentation might appear as follows:
<div>
<div>
<div>
</div>
<div>
<div>
</div>
</div>
... | evolcodegolf |
Your challenge is to analyze a genealogical network to compute the Genetic Relatedness Index for a specified individual within it.
**Definition**
The Genetic Relatedness Index quantifies the genetic relatedness between a person and their ancestors through a weighted sum based on shared lineage. Each distinct path lea... | evolcodegolf |
Task Description
Elias omega coding serves as a universal encoding method capable of transforming positive integers of any magnitude into a continuous bitstream. The procedure for decoding a provided bitstream, denoted as \$S\$, is outlined as follows:
Commence by determining if \$S\$ is devoid of content, in which ... | evolcodegolf |
Your assignment is to present the sequence of uppercase English alphabetic characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ" exclusively, avoiding any trailing newlines unless absolutely necessary. Under no circumstances are you permitted to utilize any characters that might resemble the intended letters, such as Cyrillic counte... | evolcodegolf |
In light of recent advancements, a cohort of advanced nanobots specifically designed for autonomous house construction has been successfully developed, and your task now is to program their operational framework.
Consider the architectural model generated from the parameters 7, 4, and 2:
/-----/|
/ / |
|-----... | evolcodegolf |
Let \$Z\$ be defined as either the integers, the positive integers, or the non-zero integers; please select the most suitable option for your demonstration. Construct two distinct functions, \$f\$ and \$g\$, each mapping \$Z \to Z\$, such that:
1. The equation \$f(g(a)) = g(f(a))\$ holds true for infinitely many integ... | evolcodegolf |
Create a comprehensive program that requires no user input (or includes an ignored parameter) to continuously display a precise ASCII animation consisting of exactly 8 frames, as detailed below, while ensuring it runs for the maximum duration permissible. The frames should progress in sequential order, although the ani... | evolcodegolf |
As today signifies the noteworthy event of the 26th leap second ever recorded, your task is to generate the date and time of every leap second that has transpired up to now in GMT or UTC, alongside the leap second occurring today, while ensuring that you also provide a brief explanation of the significance of leap seco... | evolcodegolf |
Prepare yourself for a thrilling challenge that delves deep into the enigma of cryptography! Your mission is to construct the most concise algorithm capable of deciphering a hidden message encoded within a unique form of a Sudoku puzzle.
In this particular variation, rather than numbers, the grid is filled with symbol... | evolcodegolf |
Transform the provided string of digits or an integer input into its indexed version by meticulously following these multi-step instructions. Utilizing the number 30043376111 as a reference, begin by calculating the cumulative index sums for each digit's occurrences:
0: 1 + 2 = 3
1: 8 + 9 + 10 = 27
3: 0 + 4 + 5 =... | evolcodegolf |
Decompose two nonnegative integers into their respective factorial summations; if any factorial exists in both representations, return a falsey value. Conversely, if there are no common factorials, return a truthy value. (inspired by a recent inquiry)
In essence, express each input number as the aggregate of factoria... | evolcodegolf |
To effectively execute a backspace-and-retype operation transitioning from one string to another, adhere to the following methodical approach:
Begin with the initial string.
Dismantle characters sequentially from the end until the remaining portion aligns as a prefix of the subsequent string. (This operation could nec... | evolcodegolf |
A sculptor has been assigned the intricate task of crafting detailed icicle sculptures for the upcoming museum in Greenland, guided by specific design parameters provided by his supervisor. These parameters consist of two critical integers: [s, m], denoting the size and the amount of melt, respectively, where the size ... | evolcodegolf |
Here is an image:
%%%%%%%%%%%%%
% Hello, %
% world! %
%%%%%%%%%%%%%
However, due to the limitations of our cognitive capacities, we find this representation quite perplexing. Therefore, we simplify it using the following method:
First, partition the image into four equal 2 x 2 sections. If any section is incomp... | evolcodegolf |
It has come to attention that there exist 59 (currently 60) queries categorized under sorting, yet a dearth of straightforward quicksort implementations persists. This deficiency requires rectification. For those who might not be well-versed in the mechanics of quicksort, an informative outline follows, with credits at... | evolcodegolf |
In this intricate task, your challenge is to generate an ASCII depiction of a chess board, where white pieces are represented by uppercase letters, black pieces by lowercase letters, and empty squares by dots (.). The complete chess board must look like this:
```
rnbqkbnr
pppppppp
........
........
........
........
P... | evolcodegolf |
Construct a program or function that, upon receiving a string composed exclusively of ASCII characters, generates an output that resembles the original string in a reversed format while adhering to the following intricate specifications.
Example:
1) Input
Hello, World!
2) Count the number of unique characters present... | evolcodegolf |
In the context of the problem at hand, we delve into a novel classification of strings known as half-sorted strings: when a string is divided into two equal segments and their positions are interchanged, it yields an output that aligns precisely with the result of sorting the original string. The task requires determin... | evolcodegolf |
Consider this complex scenario if you're feeling perplexed.
Challenge:
The objective of this intricate code-golf challenge revolves around the enigmatic number 8675309...
Your task entails generating and printing each prime number from 2 up to 8675309, initiating with the prime number 2 and subsequently skipping ... | evolcodegolf |
Challenge description
A Langford string of order N is defined as follows:
- The length of the string is equal to 2*N,
- The string contains the first N letters of the English alphabet, each letter appearing twice,
- For each pair of the same letters, there are M letters between them, where M is that letter's p... | evolcodegolf |
EDIT: I will be accepting an answer Monday, 2/15/2016. May the bytes be ever in your favor! In his intriguing "Print the N-Bonacci Sequence" challenge, @DJMcGoathem elaborates on the concept of N-bonacci sequences, wherein the sum of the preceding N numbers is utilized, contrasting with the classic approach of summing ... | evolcodegolf |
Imagine waking one day only to discover yourself ensnared in a perplexing array. Your initial instinct is to navigate out by advancing through the indices one at a time, yet you soon realize that specific rules govern your movement:
The array is entirely populated with natural numbers.
Upon landing on an index \( n \)... | evolcodegolf |
Related: Calculate Power Series Coefficients
Given a positive integer \$X\$ and a max exponent (also a positive integer) \$N\$ calculate the result of a power series, ensuring that your implementation can handle very large results efficiently. Example:
$$X^0+X^1+X^2+\cdots +X^N$$
Assume \$(X + N) \le 100\$ and return ... | evolcodegolf |
Design a computational solution without crafting any lines of code yourself. The solution must solely consist of pre-existing inquiries and responses sourced from Stack Overflow. This program is required to generate two random integers and subsequently present the results of their arithmetic operations including:
- th... | evolcodegolf |
Background
Supplementary reading 1, Supplementary reading 2
Linear lambda calculus presents a constrained variant of lambda calculus wherein each bound variable must be utilized precisely one time. An example of this is represented by the term \a b c d e -> a b (d c) e, which adheres to the rules of linear lambda c... | evolcodegolf |
Problem:
Your objective is to ascertain whether, within a designated sequence of integers, each individual integer incorporates at least one of the digits found in the integer that precedes it.
For example, the sequence below should evaluate to a truthy value:
[1, 12, 203, 0, 30]
^ ^ Incorporates a 0
... | evolcodegolf |
In the realm of information theory, a "prefix code" is defined as a specialized dictionary wherein no key functions as a prefix for another key. This essentially indicates that no string within this collection begins with the sequence of any other string present.
For instance, the set {"9", "55"} qualifies as a prefi... | evolcodegolf |
You are tasked with manipulating an array \$a\$ of integers in such a way that all elements become equal through a series of moves, where each move allows you to either increment or decrement an element by 1. The objective, however, goes beyond mere equalization; you must also ensure that the total number of moves empl... | evolcodegolf |
The objective is to proficiently render a Bézier curve within a conventional web browser environment (excluding notably antiquated versions of Internet Explorer, as their status as genuine browsers remains questionable) on the client side.
Guidelines:
You are required to furnish one or multiple files (or their respe... | evolcodegolf |
Construct a follow-up inquiry to the preceding question, requiring deeper analytical reasoning.
Task:
Consider an array consisting exclusively of positive integers. Your objective is to determine the largest element, denoted as k, for which the following condition holds true:
There exists a positive integer distanc... | evolcodegolf |
Craft a sophisticated compression algorithm tailored specifically for the efficient representation and minimization of ASCII-based mazes. This endeavor requires the formulation of both a compression mechanism and a corresponding decompression technique. Your evaluation will be derived from the total size, in bytes, of ... | evolcodegolf |
Certainly! Here’s a more complex version of the original prompt, while retaining clarity and making it slightly more challenging:
---
Indeed, while the essence of your task resembles that of a Romanizer, it embodies a significantly higher level of complexity—substantially more intricate.
The pursuit of mastering the... | evolcodegolf |
Edit (Jan 24/2021): The original specification for the challenge had a few problems. Underneath the original text, I have added alternate conditions that were suggested by @caird-coinheringaahing (thanks for the tips).
There is a gameshow in the UK called "Countdown," and a parody called "8 out of 10 Cats does Countd... | evolcodegolf |
Help! I'm currently stranded on a snow-blanketed mountain and urgently need to descend as swiftly as possible while avoiding peril. I possess a detailed map illustrating the elevation of various sections of the mountain relative to the base level. As a beginner skier, I prefer to navigate along gentler slopes; however,... | evolcodegolf |
The MMIX architecture represents a relatively straightforward big-endian RISC design, distinguished by several intriguing features, one of which is the MXOR instruction that you are tasked with implementing. This instruction interprets its two arguments, each represented as a 64-bit register, as two distinct 8×8 matric... | evolcodegolf |
The generalized harmonic number of order \$m\$ for a positive integer \$n\$ is defined as follows:
$$H_{n,m} = \sum_{k=1}^n \frac 1 {k^m}$$
To illustrate, the sequence of harmonic numbers can be exemplified by \$H_{n,1}\$, while \$H_{\infty,2}\$ converges to the value of \$\frac {\pi^2} 6\$. These values have a profoun... | evolcodegolf |
Given a positive integer K, generate a spiraling pattern of slanted triangles.
For K=1, the initial triangle is:
```
/\
/ \
/ \
/ \
```
For K=2, add the next triangle in a clockwise direction:
```
/\
/ \
/ \
/ \
/\
/ \
/ \
/ \
```
For K=3, add a 2x1 t... | evolcodegolf |
Introduction
The sequence known as telephone numbers or involution numbers represents the various ways in which \$n\$ telephone lines can be interconnected, with the stipulation that each line is permitted to link to no more than one other line. This concept was initially explored by Heinrich August Rothe in the year... | evolcodegolf |
Craft a sophisticated regular expression that accurately identifies any legitimate solution to the intricate puzzle of Sudoku while unequivocally rejecting any erroneous configurations. The provided input represents a linearized version of the Sudoku grid, devoid of any newline characters. For example, consider the fol... | evolcodegolf |
Goal:
Devise a concise program that identifies and retrieves the smallest file present in the current directory, with the measurement of file size being expressed either in bytes or characters.
In scenarios where multiple files share an identical minimum size, you may opt to select one at random or list all qualify... | evolcodegolf |
The Quest:
Given a single character Y (either upper or lower case from A to Z) and a digit M (from -3 to 9), generate a stylized representation of the letter Y, where each line of the output consists of M repetitions of the letter Y, organized in a unique pattern. This pattern must be defined by the following constra... | evolcodegolf |
Formulation
Develop a program or function that, when supplied with three distinct two-dimensional points expressed in Cartesian coordinates, determines and outputs a truthy value if the points lie on a single straight line; otherwise, it should yield a falsey value. Three points are classified as collinear if there exi... | evolcodegolf |
Consider the following numerical value presented as such:
n = 548915381
Your task is to compute and return the cumulative total of every second digit within that number. As an illustration, the calculation would yield 26, derived from the summation of digits: 4 + 9 + 5 + 8 = 26.
Parameters to adhere to:
This is... | evolcodegolf |
The ripple input method is an innovative approach to entering Japanese kanji on a contemporary touchscreen device. This method employs a 12-key configuration, with the following designations:
あたな
まやら
さはか
小も、
When a key is pressed, it yields its corresponding kanji. However, when the key is swept in one of the four car... | evolcodegolf |
Task
Your objective is to identify and display all unique composite numbers such that every multi-digit substring within their decimal format is also composite. If a number contains two or more digits, it must be composite as a whole.
For instance, 1001 qualifies because its multi-digit substrings, such as 10, 00, ... | evolcodegolf |
Your task is to meticulously arrange a collection of vocabulary terms across multiple lines, ensuring that no line exceeds a specified character limit while maximizing the number of words per line, and ensuring that no words are truncated unnecessarily.
Input
The input will consist of a space-separated series of te... | evolcodegolf |
Your objective is to ascertain whether a given graph qualifies as planar, defined as the capacity to be embedded in a two-dimensional space without any edges intersecting.
Input: You will be provided with an undirected graph represented in one of the following formats:
Edge list, e.g. [(0, 1), (0, 2), (0, 3)]
Adjace... | evolcodegolf |
Background
The Burrows–Wheeler transform (BWT) is a reversible permutation of the characters in a string that produces extensive runs of identical characters for particular categories of strings, such as plain text. This transformation plays a crucial role in various data compression algorithms, including the widely-us... | evolcodegolf |
Your objective is to develop a function that accepts the precise coordinates of a cell within a two-dimensional grid and a specified radius \$r\$ and subsequently generates the coordinates of all cells encompassed in the provided coordinate's von Neumann neighborhood, defined specifically as those cells that are at mos... | evolcodegolf |
Construct a program that takes a positive integer as input and processes it to yield a specified value from a defined finite set based on whether the number is divisible by twice the cumulative sum of its individual digits. In simpler terms, determine if the double of the sum of the digits divides the given number, den... | evolcodegolf |
Develop a specialized program or function that accepts an explicitly defined, nonempty array of strictly positive integers. It can be assumed that the input will adhere to a user-friendly format, such as "1 2 3 4" or [1, 2, 3, 4]. The integers within the array denote the individual segments of a comprehensive pie chart... | evolcodegolf |
Task
Your objective is to devise a memorable phrase that serves as a secure passphrase, utilizing either a random word generator or a selection of words based on a provided theme.
Input
No theme
Or
A specific theme (e.g., nature, adventure, etc.)
Output
A secure passphrase
Scoring
Your score is determ... | evolcodegolf |
From Wikipedia:
The centroid of a non-self-intersecting closed polygon characterized by n vertices (x0,y0), (x1,y1), ..., (xn−1,yn−1) is the point (Cx, Cy), where
and where A represents the signed area of the polygon.
In these mathematical formulations, the vertices are presumed to be enumerated sequentially acco... | evolcodegolf |
Implement the pendulum encoding technique by taking an input string presented in any suitable format as per the conventions of your programming language. The provided test cases should be examined individually, ensuring clarity in the demonstration of the encoding process.
Please delineate the steps for achieving this... | evolcodegolf |
Balancing Act: A More Complex Challenge
A see-saw, which is etymologically traced back to the French term 'ci-ça' signifying 'this-that,' constitutes one-third of the quintessential playground apparatus, accompanying the ever-present slide and swing. A see-saw achieves a state of equilibrium if, and only if, the aggre... | evolcodegolf |
Challenge
Given a comprehensive list of unique string identifiers paired with their respective decimal values, along with a specified threshold n, return every distinct combination of keys where the cumulative sum of their associated values meets or surpasses the threshold n.
Input
Input will be formatted as foll... | evolcodegolf |
The palindrome expansion (PE) process is a mathematical operation involving a number and its digits. To execute this, take a number, construct a palindrome by mirroring its digits, and add the two results. Repeat this with the sum until a palindrome is reached. For example, starting with the number 37:
$$ 37 + 73 = 1... | evolcodegolf |
You are tasked with developing an interpreter for an intriguing and whimsical programming language known as Chicken! The interpreter must be capable of reading a Chicken program from various sources, including a file, standard input, program arguments, or any other method that best suits the implementation in your chos... | evolcodegolf |
Introduction
In this challenge you will be tackling diagonal Burrows-Wheeler transforms, focusing on their intricate encoding and decoding mechanisms. Here is a detailed overview of what a diagonal Burrows-Wheeler transform encompasses. To encode a message, you first must ensure that it is of odd length (i.e., 5, 7, ... | evolcodegolf |
Formulate the simplification of the square root of a given positive integer n, transforming √n into the form a√b by methodically extracting all square factors through multiple steps. Ensure that the resultant values of a and b are strictly positive integers, satisfying the equation n = a^2 * b, with b minimized as much... | evolcodegolf |
Given a compilation of academic letter grades, compute the resultant GPA (grade point average) of these specific grades, ensuring the final value is rounded to one decimal point. The valid letter grades and their corresponding grade point values are delineated as follows:
A = 4 grade points
A- = 3.7 grade points
... | evolcodegolf |
This challenge is inspired by the game CellConquer. You are provided with a 3D cube composed of smaller cubes, each cube either being empty (represented by 0), or containing a 1, 2, 3, or 4. Your task is to partition this cube into valid clusters, with the following criteria: Each cluster must encompass all non-empty c... | evolcodegolf |
Strobogrammatic Numbers
Definition
A number exhibiting rotational symmetry such that it retains its appearance when subjected to a 180-degree rotation within the plane of your display. The accompanying illustration elucidates this concept more clearly,
(source: w3resource.com)
Task
Given a number as the input, ... | evolcodegolf |
Consider a function \$f\$ designed to process a string by systematically eliminating all instances of adjacent identical characters. For instance, applying the function to the input \$f(a\color{red}{bb}ba\color{red}{cc})\$ results in the output \$aba\$. It is essential to note that in situations where two pairs of iden... | evolcodegolf |
Consider a square composed of printable ASCII characters (with code points ranging from 0x20 to 0x7E) where the side length is denoted as N, illustrated here with an example for N = 6:
=\
g \
7
m+y "g
L ~
e> PHq
In addition, it is imperative that each row and each column must incorporate at least one s... | evolcodegolf |
Recently, I was introduced to a puzzle game known as Solitaire Chess. I'll summarize the rules here:
The board is a 4x4 checkerboard.
All pieces are the same color (no teams) and all pieces can capture any other piece.
Every move must be a capture. No moving to empty squares.
There must be exactly one piece remaining ... | evolcodegolf |
Construct a program that takes a sequence of letters and generates all potential combinations using symbols from the periodic table, ensuring each variation maintains the integrity of capitalization. For instance, with the input 'bacon', the program should yield:
BaCoN
BAcON
BaCON
Furthermore, if a specific word canno... | evolcodegolf |
Inspired by a polyglot on the Stack Overflow 404 page:
Goal
Your goal is to create a polyglot that outputs the number 404, and then terminate, in as many languages as possible while adhering to specific constraints.
Restrictions
Here's the twist, there's a restriction to make it harder:
You have to write N prog... | evolcodegolf |
When tasked with navigating a tedious or monotonous text, the desire for a swift resolution often arises. Let us delve into the following excerpt:
Ens colligi timenda etc priorem judicem. De quascunque ii at contingere
repugnaret explicetur intellectu. Adjuvetis hoc fortassis suspicari opportune
obversari vix eam... | evolcodegolf |
In a programming language of your choice, create a program that initializes a variable K to zero, prints the value of K, and then appends a new line of code to its own source file such that the next execution increments K by a random integer between 1 and 10. Your implementation should ensure that each time the program... | evolcodegolf |
Output the following six 2D integer arrays in a reasonable format, while ensuring each array has exactly 5 rows and 6 columns with the additional constraint that all elements must be unique integers ranging from -60 to 60:
[[ 1, 11, 21, 31, 41, 51],
[ 3, 13, 23, 33, 43, 53],
[ 5, 15, 25, 35, 45, 55],
[ 7, 17, 27, 3... | evolcodegolf |
Print or return the following string, while ensuring that the output adheres to the specified formatting rules even when printed in different programming languages:
R******* *R****** **R***** ***R**** ****R*** *****R** ******R* *******R
*....... .*...... ..*..... ...*.... ....*... .....*.. ......*. .......*
*....... .*... | evolcodegolf |
Given three unique integers, return the maximum product that can be obtained by multiplying any two of the integers. If any integers are equal, return 0. Specifically, implement the function:
\$ g(x,y,z) = \cases{0 & if $x = y$ or $y = z$ or $z = x$ \\ max(xy, xz, yz) & otherwise} \$
Shortest code in each language ... | evolcodegolf |
In the intriguing realm of 2D puzzles, Shikaku presents a captivating challenge where a rectangular grid is populated with various integers, and the objective is to neatly partition this grid into rectangular segments, ensuring each segment contains precisely one number, which corresponds to the total count of grid squ... | evolcodegolf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.