instruction_seed
stringlengths
29
40.5k
source
stringclasses
6 values
Your task involves manipulating a 3x3 grid in which the representation of spaces is indicated by - (denoting blank spots) and filled positions are represented by * (denoting occupied spaces). For instance, consider the following arrangement: -** -*- *-* Your objective is to transform this configuration such that the ...
evolcodegolf
You are tasked with developing a program that generates a single positive integer \$n\$. This integer can include leading zeros and whitespace, along with trailing whitespace. Additionally, select a positive integer \$m > 1\$, ensuring that the program is executed precisely \$m\$ times to yield the output of \$m \times...
evolcodegolf
Output this exact text: 1 j 12 kj 123 lkj 1234 mlkj 12345 nmlkj 123456 omlkj 1234567 ponmlk 12345678 qponmlk 123456789jponmlk 12345678 qponmlk 1234567 ponmlk 123456 omlkj 12345 nmlkj 1234 mlkj 123 lkj 12 kj ...
evolcodegolf
The concept of identicons involves visual representations of hash values, typically manifested through symmetrical geometric designs. A prime example of this is the default avatar on Stack Exchange, which is an identicon. This task is an intriguing endeavor to create "wordenticons," which are straightforward text-based...
evolcodegolf
Objective Given a string comprising a sequence of hashes, compute its overall length and divide it by the linear distance from the initial to the terminal point. Simulation What are we modeling? Based on the research presented in this paper, the ratio of a river's length to the direct distance between its source ...
evolcodegolf
**Introduction** While the factorial function is typically defined for natural numbers, its extension to the domain of all positive integers, real numbers, and even complex numbers has led to fascinating developments in mathematics. One notable extension is the Beta function, denoted as B, which plays a critical role...
evolcodegolf
Executive summary Given a positive integer k, determine an optimal partition of the set of integers ranging from 1 to n into k distinct sum-free subsets for the maximum feasible value of n within a constrained timeframe of 10 minutes. Background: Schur numbers A collection A is defined as sum-free if the self-sum...
evolcodegolf
In the context of a recent work-related endeavor, we stumbled upon an exceptionally extensive algorithm for producing a 6-character string drawn from a meticulously defined 15-character set. Several team members provocatively suggested, "I wager we can condense this into a single line," thus igniting a friendly interna...
evolcodegolf
Fermat's Last Theorem, mod n with Multiple Conditions It is an established theorem that for every integer \$p>2\$, there are no positive integers \$x, y, z>0\$ that satisfy the equation \$x^p+y^p=z^p\$. However, this theorem's validity changes when we consider these integers modulo \$n\$. You will receive two positiv...
evolcodegolf
In the context of a Cops and Robbers challenge, where participants engage in a distinctive form of competition, you can refer to the provided resource for the cops' segment. For the purpose of this challenge, let's establish that whitespace will exclusively include linefeeds (0x0A) and spaces (0x20). It's important to ...
evolcodegolf
Your objective is to perform the multiplication of two single-variable integer polynomial expressions, deriving their unsimplified left-to-right expansion according to the first-term-major order (commonly referred to as FOIL for binomials). Refrain from combining like terms or rearranging the outcome. For clarity in th...
evolcodegolf
The exploration of Fibonacci primes, which are defined as prime numbers that are also part of the Fibonacci sequence, reveals a fascinating mathematical landscape. Presently, there are 34 confirmed Fibonacci primes alongside an estimated 15 probable ones. For the purposes of this task, Fibonacci numbers are generated t...
evolcodegolf
My canine companion is affectionately named Rex. Each time I express discontent towards him, he exhibits a profound lack of response, with my vocal disapproval eliciting no significant change in his demeanor. The singular instance in which I observe a reaction from him is when I enunciate his name. For example, if I we...
evolcodegolf
The operation of linear discrete convolution serves as a critical process that transforms two vectors of numerical values into a distinct third vector through a method of element-wise multiplication. Formally, for two vectors a and b, with indices ranging from 0 to n - 1, the discrete linear convolution of a and b is c...
evolcodegolf
Introduction The Prime Counting Function, often referred to as the Pi function \$\pi(x)\$, quantifies the total number of prime numbers that are less than or equal to a specified integer x. Challenge Your task is to develop a program that accepts a positive integer x as input and returns a single integer that re...
evolcodegolf
Your task, should you be inclined to undertake it, involves, given a non-negative integer K such that K >= 1, to identify pairs of non-negative integers A and B that satisfy at least one of the following two mathematical relationships: K = 2^A + 2^B K = 2^A - 2^B In the event that such integers A and B cannot be ...
evolcodegolf
You are tasked with the evaluation of a countable ordinal \$1 < r < \varepsilon_0\$. Ascertain whether this ordinal possesses the characteristics of a prime entity. In the event that it is not prime, please delineate precisely two ordinals \$r_0, r_1 < r\$ such that \$r_0r_1 = r\$ according to the rules governing ordin...
evolcodegolf
Objective: Given a positive integer n, implement the following criteria: - In the case where n is an odd integer, output an ordered list containing the n integers that are closest to 0, arranged in ascending order. - Conversely, if n is determined to be an even integer, output a value that evaluates to false (i.e., an...
evolcodegolf
The inquiry revolves around a problem initially articulated using the C programming language; however, solutions articulated in any programming language will be deemed acceptable. At the conclusion of the inquiry, you will also find a Pythonic interpretation for reference. Envision a scenario within a more extensive s...
evolcodegolf
Given an n-dimensional array populated with numerical values, determine which p-dimensional subset of this array yields the maximal summation of its elements. Input An n-dimensional array of numbers or the equivalent representation in your programming language. It is acceptable for this array to be rectangular or to ...
evolcodegolf
Challenge: Given a list, P containing non-negative integers as input: 4 3 5 1 2 construct a grid where the m'th row contains the vector 1:P(m), filling longer rows with the next sequential integers, and padding shorter ones with negative ones. Test cases: 4 3 5 1 2 ----------------- 1 1 1 1...
evolcodegolf
I feel fatigued by the prospect of tackling "find the pattern" exercises, such as the following examples: 1 2 3 4 (5) 1 2 4 8 (16) 1 2 3 5 8 (13) Please develop a program that not only identifies the underlying pattern but also ensures that the derived recurrence relation adheres to the given input while maint...
evolcodegolf
Create a "spectralpolyquine": a program that acts as a quine, is a polyglot across at least three programming languages, and generates its output as a complex or fractal structure in the form of ASCII art. Rules: The emphasis is on the intricacy of the generated output and the number of polyglot languages involved. ...
evolcodegolf
Input None Output Generate a complete set of 52 distinct playing cards, ensuring no duplicates are included. Each card must be represented using its corresponding Unicode character, following the specific coding format outlined below: The initial three digits must always be 1F0. The subsequent digit must be ...
evolcodegolf
Given a collection of phrases and a matrix filled with random characters, identify all occurrences of the phrases within the matrix and eliminate any characters that are not part of those phrases. Phrases may appear in any direction: horizontally, vertically, or diagonally, as well as forwards and backwards. Assume tha...
evolcodegolf
Background I have a collection of uniformly sized, square boxes, and as someone who values organization, I aim to arrange them into a square-like configuration. However, the total number of boxes does not always form a perfect square, necessitating an approximation to achieve a near-square appearance. I require your ...
evolcodegolf
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. Happy Hanukkah! A beloved Hanukkah tradition for many, the game of Dreidel (s'vivon in Hebrew) is a betting game (for money or for chocolate gelt (coins)) centered on the titular spinning tops called dreidels. Dreidels have four sides:...
evolcodegolf
Given an integer, determine and output a truthy value if it exhibits rotational symmetry when viewed upside-down (rotated 180°), or a falsy value if it does not. It is worth noting that the digits 0, 1, and 8 maintain their appearance post-rotation, while the digits 6 and 9 transform into one another. To thoroughly val...
evolcodegolf
Engaging in a unique programming challenge, I would like to present a task that delves into the intricacies of a 2D esolang I created in 2023, named Electra. Upon reflecting on my inaugural "Hello World!" implementation, which intriguingly consists of 582 bytes, I recognize substantial opportunities for code minimizati...
evolcodegolf
Design a mechanism that can accurately simulate waiting for a millennium, ensuring an acceptable error margin of ±5%. Consider the challenges of system stability and potential interruptions such as restarts, power outages, or clock drift. Outline a methodology that effectively tracks the elapsed time over such an exten...
evolcodegolf
As an avid enthusiast of video game soundtracks, particularly the captivating original soundtracks from the Kingdom Hearts series composed by the talented Yoko Shimomura, I present you with an engaging programming challenge. Your task Develop a program or function that accepts two parameters in any specified format: ...
evolcodegolf
In the realm of combinatorial tiling, consider a unique arrangement of hexagonal tiles over a defined triangular area. Background A hexagon can cover a portion of the triangular area in such a way that: - Each hexagon is entirely positioned within the triangular boundaries, - The hexagons collectively cover the tr...
evolcodegolf
Your task involves constructing a comprehensive Boolean parser capable of evaluating complex Boolean expressions through multi-step reasoning. Boolean expressions consist of two inputs and a singular output. The fundamental 'gates' employed in Boolean arithmetic include OR (denoted by |), AND (represented by &), NOT (...
evolcodegolf
Your business involves the sale of gold coins, each of which is marketed as weighing precisely 1 ounce. However, a troubling discovery reveals that one particular supplier has been deceitfully alloying the gold with other materials, resulting in their coins weighing only 0.9 ounces. Equipped with a precision pointer sc...
evolcodegolf
Design a function that receives a number (which can be either composite or prime) and returns the nearest two prime numbers that sandwich it. One should be the largest prime less than the input and the other the smallest prime greater than the input. For example: Input: 1453 Output: 1451 1459 Aim for minimal code l...
evolcodegolf
A prime is considered weak if the closest other prime is smaller than it, and in instances of a tie, the prime cannot be classified as weak. Furthermore, for any input prime, ensure your code validates whether it is included in the list of known weak primes before performing the comparison. For example, 73 qualifies as...
evolcodegolf
Rules Given an ISO3166-1-Alpha-2 country code, your task is to decide on the traffic direction for that country, ensuring your output adheres to specific format requirements: Input will be a valid country code (valid as in it's an element of the two lists provided) Input may be a list of two characters instead o...
evolcodegolf
Your objective is to compute the product of two integers provided in the input, which are separated by a comma. However, you must do so without utilizing the multiplication operator "*" in any form, nor can you employ any looping constructs. The challenge is to achieve this with the most concise code possible, adhering...
evolcodegolf
The American football championship, Super Bowl 50, is happening today at 11:30pm UTC (and you can watch it live online). This challenge was made to celebrate it. In an American football game, two teams compete to get the most points, and there are six ways to score these points. We'll give each an abbreviation: Field...
evolcodegolf
Challenge The task at hand is straightforward yet intriguing: utilize the online tool http://isup.me to ascertain the operational status of an entered website. If the website is operational and accessible, you should return a truthy value; conversely, if the site is non-functional or down, a falsey value should be re...
evolcodegolf
Related: Sort these bond ratings and their complexities Credit rating agencies evaluate and assign ratings to bonds based on the intricate credit-worthiness of the issuer. The rating landscape is predominantly dominated by the "Big Three" credit rating agencies (i.e., Fitch Ratings, Moody's, and Standard & Poor's (...
evolcodegolf
A matrix can be conceptualized as representing the altitudes of a surface in three-dimensional space. Consider the eight neighboring cells (both orthogonal and diagonal) of a specified cell arranged as a cyclic sequence in either clockwise or anticlockwise order. Each neighbor may be positioned at a higher altitude tha...
evolcodegolf
"Hey Alice, I'm looking for a catchy title for my new project that embodies the essence of 'Dynamic Innovation Network'. Can you craft an acronym that sparks curiosity and stands out from the ordinary?" "Absolutely, I’ll be happy to design an eye-catching phrase that captures the spirit of your initiative without fal...
evolcodegolf
Challenge: Input: A positive integer \$n\$ Output: Generate a comprehensive list comprising all integers from \$1\$ to \$n\$, subsequently concatenating these into a single string (for instance, \$n=13\$ would yield the string 12345678910111213). Next, derive and display a triangular arrangement using either the prefix...
evolcodegolf
To tackle the problem of deriving the minimal scalar product from two vectors of potentially disparate lengths, we must delve deeper into the relationships between their elements and employ a strategic approach to achieve optimal results. The scalar product can be calculated using the formula: x1 * y1 + x2 * y2 + ... ...
evolcodegolf
Given a positive integer m > 1 as input, generate a sample from a modified discrete trapezoidal distribution over the integers j, for 1 <= j <= m, where the probability p(j) is defined as p(j) ∝ j*(m - j). For example, if m = 4, then p(1) = 0, p(2) = 2, p(3) = 6, and p(4) = 0. Your implementation should run in constant...
evolcodegolf
A positive integer n qualifies as a jumping number if every pair of its consecutive decimal digits exhibits a difference of precisely 1. Additionally, each single-digit integer is categorized as a jumping number. For instance, examples of jumping numbers include 3, 45676, and 212, whereas 414 and 13 fail to meet the cr...
evolcodegolf
As the leader of a community project, you find yourself in a strategic contest against another project leader to win over the allegiance of a neighborhood comprising 256 individuals arranged in a 16x16 layout. This neighborhood is yet to be delineated into specific engagement zones, presenting you with a prime opportun...
evolcodegolf
In a fantastical realm, five wizards of varying powers discover a mystical treasure of 100 enchanted crystals. They must choose how to distribute the crystals, adhering to their hierarchical order of magic mastery: Wizard A, the most powerful, down to Wizard E, the least powerful. The wizards follow a unique set of pr...
evolcodegolf
The Challenge The primary objective of this task is to ascertain whether a specified String can be entirely constructed using solely one horizontal line of a conventional UK QWERTY keyboard layout. As this is a code golf exercise, the challenge is to devise the shortest possible solution measured in bytes! IO The ...
evolcodegolf
Here’s a widely recognized paradigm utilized in the realm of sorting algorithms: ```python def sort(l): while not is_sorted(l): choose indices i, j assert i < j if l[i] > l[j]: l[i], l[j] = l[j], l[i] ``` These sorting algorithms achieve their efficiency through the meticul...
evolcodegolf
I'm not entirely certain if this is the most appropriate forum for my inquiry, but having come across a related question, I feel compelled to proceed with my request. As a novice to the art of code golfing, I kindly ask for any snickers or eye-rolls to be kept to a minimum. Recently, a challenge was presented—albeit br...
evolcodegolf
Everyone appreciates the brilliance of The Big Bang Theory, don’t they? And surely, the charm of polyglots captures everyone's fascination as well? Let’s create a fusion of both concepts! Task Your assignment, though straightforward, carries additional intricacies. You are required to output the name of one of the ...
evolcodegolf
Devise a method to segment an n X n square into various irregular quadrilaterals with distinct integer side lengths. Define b(n) as the minimal achievable difference between the area of the largest and the area of the smallest quadrilateral. ___________ | | A | | |_____| | | | | B | | |_____|_...
evolcodegolf
The source of inspiration for this challenge stemmed from an observation I encountered: The term "nun" can be whimsically described as the letter 'n' performing a cartwheel. Your task is to analyze a given string and ascertain whether it represents the initial character executing a cartwheel maneuver. Guidelines ...
evolcodegolf
Your objective involves the implementation of the integer sequence denoted as A130826: an represents the smallest positive integer whereby the expression an - n is an integer multiple of 3, and the quantity derived by multiplying the number of divisors of (an - n) / 3 by two yields the nth term within the first differ...
evolcodegolf
You are presented with a string composed exclusively of ordinary lowercase a-z characters. (You can safely assume this will hold true in all test cases, and that all letters will be in lowercase format). Your task is to ascertain the total number of unique combinations that can be derived from the individual characters...
evolcodegolf
Background After the execution of the Burrows-Wheeler Transform (BWT) and the Move-to-Front (MTF) encoding techniques, the bzip2 compressor employs a distinctive variant of run-length encoding (RLE) that warrants closer examination. Definition In this challenge, we will define the transformation known as BRLE wit...
evolcodegolf
Background Polyagony is a family of hypothetical esolangs where the source code is laid out on a specifically shaped board before execution. It bears resemblance to Hexagony; however, various uniform tilings can be utilized instead of a mere hexagon. The configuration of the board and the tiling applied is governed b...
evolcodegolf
Develop a program that implements the ROT-128 algorithm, a variant of ROT-13 that cycles through all 256 possible bytes, such that the output is the ROT-128 version of its own source code. Additionally, ensure that this outputted code remains a valid executable and can reproduce the original program correctly upon exec...
evolcodegolf
Challenge: Given a 3D grid of 0s and 1s representing a volumetric space, compute the number of iterations required for a modified version of Conway's game of life to stabilize, or -1 if it perpetually oscillates. A stable state is defined as one where no cells change their state between iterations. The grid must adhe...
evolcodegolf
This challenge draws inspiration from a prior challenge that you might consider reviewing for additional context. Nonetheless, due to the distinct nature of competitive responses, I determined that it was most appropriate to present this as an independent query following some discussions on Meta. The objective is to d...
evolcodegolf
Craft a piece of code in any programming language that accepts a string input, for instance, "Today is a great day" (ensuring there is an absence of punctuation), and translates it into what is referred to as the "Secret Language." This transformation must adhere to the following stipulations: a=c, b=d, c=e, and this...
evolcodegolf
For this challenge, we are tasked with representing time in a structured format: hh:mm:ss. Consider the following examples as a reference: 12:34:08 06:05:30 23:59:00 The objective here is to determine the time that would result after a specified duration—measured in hours, minutes, and seconds—has passed, sta...
evolcodegolf
Design a new assembly-like language named "Concord," where multiple concurrent processes share a set of registers and communicate through an inter-process messaging system. Each process operates with a unique ID and can utilize 30 registers named a to z and A to Z, all initialized to zero. The operations in Concord inc...
evolcodegolf
Tomorrow marks the highly anticipated launch of Minecraft version 1.12, prompting an exciting celebration! Compose a concise algorithm that accepts a non-negative integer N, symbolizing the quantity of identical stackable items in Minecraft. The output should be formatted to aid players by delineating the total numbe...
evolcodegolf
Could you provide a series of general tips specifically tailored for golfing in various dialects of Lisp? For each piece of advice, please ensure it pertains exclusively to one dialect and is posted in a separate response. Additionally, please indicate the specific dialect of Lisp to which your tip relates. Avoid gener...
evolcodegolf
Challenge Given an input x, devise a solution to create a directory (commonly referred to as a folder) within the file system, designated by the name x. Languages that lack the capability to generate file system directories are disqualified from participating in this challenge. The directory's location may be fre...
evolcodegolf
The Definitions Consider an n x n square matrix A, which can be classified as invertible if there exists another n x n square matrix B such that AB = BA = In, where In denotes the identity matrix of dimension n x n (comprising 1s along the main diagonal and 0s elsewhere). In this context, AB and BA are evaluated usin...
evolcodegolf
Introduction The well-known childhood chant Eeny, meeny, miny, moe has historically served the purpose of determining who would be designated as "it" during games of tag. Participants would gather in a circle, each pointing at an individual chosen arbitrarily, while reciting the following lines: Eeny, meeny, miny, m...
evolcodegolf
After an extensive and frustrating search, I stumbled upon the code snippet provided below. Please condense it for optimization purposes (code golf) and rectify the specific issue I encountered (bonus). ```c #define LN_SOME_TEXT_FIELD 256 void GetSomeText(LPTSTR text) { TCHAR buf[LN_SOME_TEXT_FIELD + 1]; ...
evolcodegolf
Description Generate the rhyme pattern for an extended sequence of Villanelle stanzas. Input None. Output ABA ABA CBC CBC DED DED EFE EFE GHG GHG HIH HIH JKJ JKJ LML LML NQN NQN OPO OPO PQO PQO Rules You can choose to separate stanzas with a single line or double...
evolcodegolf
INTRO Imagine you are composing a text in a language with intricate rules surrounding punctuation placement. While in many languages you can simply insert commas and periods wherever you see fit, in this specific language, each punctuation mark has strict guidelines dictating where it can be used based on the surroun...
evolcodegolf
Explore the concept of the ROT13 cipher: A|B|C|D|E|F|G|H|I|J|K|L|M N|O|P|Q|R|S|T|U|V|W|X|Y|Z In this transformation, each letter is replaced by the letter 13 positions down the alphabet. Interestingly, certain words exhibit a unique behavior when transformed using ROT13: their resulting form is a shifted version of th...
evolcodegolf
Motivation: There are instances when pinpointing your exact position within a string becomes essential. The goal is to navigate through any segment of a string and ascertain your precise location as accurately as possible. Challenge: Develop a program that generates a tape measure string of a specified length. This t...
evolcodegolf
Programming Puzzles & Code Golf has opened a taco truck! The word is out and now users from all over the Stack Exchange network are coming to try our tasty, authentic ASCII tacos. We need your help to ensure that everyone gets their orders in a timely manner. There isn't a whole lot of room inside food trucks, so you'l...
evolcodegolf
In the intricate realm of chess, an established guideline regarding draws due to position repetition often arises. Specifically, if a particular configuration recurs on the board three or more times, the player poised to make a move that triggers this recurrence is entitled to assert a draw. While it may be straightf...
evolcodegolf
The Levenshtein distance, a metric quantifying the least number of single-character insertions, deletions, or substitutions necessary to transform one string into another, plays a crucial role in this task. Given a binary string \$S\$ of specified length \$n\$, where \$n\$ is greater than or equal to 3, we seek to dete...
evolcodegolf
the challenge Create a transformative compiler for a niche esoteric programming language. You are free to choose the language and the specific transformation techniques, whether it involves optimization, code generation, or even converting to another esoteric language. scoring A benchmark program will be provide...
evolcodegolf
Here is the intricate scenario for which I am currently only able to conceive an iterative resolution, and have yet to identify a concise mathematical expression: You are tasked with painting a residential structure that consists of R individual rooms. Each room comprises four distinct walls and one ceiling, all posse...
evolcodegolf
You are a Computer Science professor engaged in instructing the intricacies of the C programming language. A key concept you aim to instill in your students is the importance of modularity. Unfortunately, previous cohorts have struggled to grasp this principle, often submitting assignments with their entire logic confi...
evolcodegolf
Devise a comprehensive function or program that takes a single line of input, systematically executes a peculiarly intricate and somewhat reminiscent shuffle on its constituent characters, and subsequently returns the transformed result. The precise shuffling process can be delineated through the following algorithmic ...
evolcodegolf
Please provide an output containing the following visual representation, ensuring to maintain the specific format of backslashes as U+FF3C and adhere to the stipulation that while leading whitespace is prohibited, trailing whitespace is permissible. Additionally, explain the process you used to derive this output, cons...
evolcodegolf
In an innovative programming language, there's a unique operator denoted by ₒ. This operator takes a non-empty list of integers and generates a binary string where '1' appears at positions corresponding to the elements in the list, while '0' fills the other positions. For example: [2,4,6]ₒ = "010101" [1,3,5]ₒ = "101...
evolcodegolf
Create an advanced integer operation scriptable calculator that requires a more nuanced approach to understanding the sequence of operations. Concept: The accumulator, initialized at 0, undergoes a series of operations that modify its value. Ultimately, the program should output the final state of the accumulator afte...
evolcodegolf
Challenge description Dominoes is an engaging game played with tiles that feature two values—one on the left and one on the right, such as [2|4] or [4|5]. Two tiles can be connected if they share a common value, enabling the combination demonstrated here: [2|4][4|5] We'll define a sequence of n connected tiles as...
evolcodegolf
... Ah, my apologies, it seems there is no popcorn available; we only have POPCNT. Please construct the most succinct program or function capable of accepting an integer n and producing a list of all integers ranging from 0 to 2^n - 1, organized in ascending order based on the quantity of 1 bits present in their bina...
evolcodegolf
You are presented with an array A consisting of n strictly positive integers, ensuring that n is at least 2. Your objective is to create a mapping for each element Ai according to the following criteria: 1. Assign a value of 1 if for every element Aj, the condition Aj mod Ai results in an odd number, with the stipulat...
evolcodegolf
Challenge Given an array of single digit positive integers, determine whether any two distinct elements within it sum to 10, and return all such pairs formatted correctly. Example Input (1,2,3,4,5,5,6,7) This returns ((4,6),(5,5),(3,7)) Input (1,2,3,4,5) This returns (). as there is only one 5 Inp...
evolcodegolf
The Challenge Your task is to create a program that takes any given string input, and outputs the input in a squared format, ensuring that the diagonal elements of the output are reflected in reverse order of the original string. Empty strings should return an empty string. Examples Given the input: golf Y...
evolcodegolf
Background Elias omega coding is a universal code which can encode positive integers of any size into a stream of bits. Given a positive integer \$N\$, the encoding algorithm is as follows: Start with a single zero in the output. If \$N=1\$, stop. Prepend the binary digits of \$N\$ to the current output. Let \...
evolcodegolf
Create a code snippet in any programming language that, when executed repeatedly n times (where n is an integer greater than zero), produces output that reflects the value of n in decimal, octal, and hexadecimal formats, displayed in that specific sequence and separated by spaces. Ensure that the output does not includ...
evolcodegolf
Exploration of numerical sequences can often feel mundane, particularly when confined to the straightforward enumeration of positive integers (1, 2, 3, ...). Therefore, I present to you a series of intricate challenges centered around the permutations (reshufflings) of all positive integers. This specific task constitu...
evolcodegolf
Juxtrior is a newly coined term blending Junction, Factor, and Truncate. Definition Given an integer M > 10: If M is prime, M is not a Juxtrior Number. If M is composite: Continuously calculate M' = M / f + f - 1 until M' is prime, where f is the largest factor of M less than M. M is classified as a Juxtr...
evolcodegolf
You have been contracted by the American embassy situated in the United Kingdom to serve as a translator. Utilizing your programming skills, you opt to develop a program that can assist in automating certain aspects of your task. It has come to your attention that satisfying the spellcheck feature of Microsoft Word—c...
evolcodegolf
Your mission, should you choose to undertake it, is to construct a comprehensive program that, when executed, produces a non-zero number (this may be either an integer or a floating-point value). The challenge lies in the stipulation that upon reversing your source code, the resultant output must represent the original...
evolcodegolf
A digital art competition has concluded, and participants submitted their works in various formats. Each submission is stored in a database, mapping participant ID to the format type and a unique checksum. The data structure looks something like this: {101: ("png", "xyz123"), 202: ("jpeg", "abc456"), 303: ("png", "xyz...
evolcodegolf
Input Two sequences consisting of ternary digits (sequence_x, sequence_y) of the same length => 4. Output Two sequences with ternary digits (smoothed_x, smoothed_y) that minimize the Weighted Variation while maintaining the same total sum before and after processing: sum(sequence_x) + sum(sequence_y) == sum(smoot...
evolcodegolf
The dice game Mia introduces a very non-trivial order of sets of size two: {3,1} < {3,2} < {4,1} < {4,2} < {4,3} < {5,1} < {5,4} < {6,1} < {6,5} < {1,1} < {2,2} < {6,6} < {1,2} In general, the order within a tuple does not matter {x,y}={y,x}, {1,2} is greater than anything else, Pairs are greater than non-pair...
evolcodegolf
The concept of Hamming distance between two binary strings refers to the count of differing positions between them. You are provided with a collection of binary strings, and your objective is to compute the total length of the shortest cyclic route that visits each string at least once, returning to the initial startin...
evolcodegolf