instruction_seed
stringlengths
29
40.5k
source
stringclasses
6 values
Given an input of a "train station" in ASCII art where platforms are designated by '-' characters and a single train carriage is marked with '@', output the train carriage's designation according to specified rules. Here is an example of an ASCII train station: ``` ----- ----- --------- -----...
evolcodegolf
The New York Times periodically runs a puzzle known as the "Spelling Bee," wherein they provide six "allowed" letters alongside one "mandatory" letter, challenging the reader to generate as many valid dictionary words consisting of five letters or more from the given letters. Each "allowed" letter may appear zero or mo...
evolcodegolf
Considering a positive integer n alongside a real-valued variable a, the n-th iteration of tetration for a is articulated as a^(a^(a^(...^a))), where the exponentiation operator (^) denotes exponential functions, and this expression encompasses the value of a precisely n iterations deep. To put it differently, tetratio...
evolcodegolf
The goal of this exercise is to creatively illustrate a wandering journey on a 2D plane, where each step \$k\$ is guided by the nature of \$k\$ (whether it is a perfect square or not) and the characteristics of its decimal representation. The starting direction will be established, let’s say East. All steps are of eq...
evolcodegolf
Al wanted to utilize my computer for conducting some straightforward calculations, so I allowed him access to my R terminal for a brief period. He expressed dissatisfaction, stating it wasn't configured to his liking. I assured him, saying, "No problem, Al, adjust it as you prefer, and I'll restore it later." This arra...
evolcodegolf
In the context of a discrete triangular distribution defined over integers k such that 1 <= k <= n (where 1 <= k < n is permissible), and given an integer n >= 1 as input, your task is to produce a sample. The distribution is characterized by the property p(k) ∝ k. For instance, when n = 3, the probabilities are define...
evolcodegolf
Long time lurker first time poster here. Write a program which takes 3 inputs: X, Y, and Z. X = across (columns) Y = down (rows) Z = Location Marker The program should then print a visual grid X across and Y down. This grid can be made of any character except "+". Each 'location' is given an index number, c...
evolcodegolf
Design a Garden Layout You will receive an ASCII representation of a garden plot defined by boundaries using | and -. Your task is to arrange various flower beds within it. Example Input: ``` ------ | | | | | | | | ------ ``` Output: ``` /\\ /\\ | | | | | | | | | \\//...
evolcodegolf
Challenge Given two positive integers as input, your task is to systematically determine and output the mathematical operations applicable to those inputs, enabling the generation of each integer from 1 up to n, where n is defined as the smallest prime number that is greater than the cumulative sum of the two inputs....
evolcodegolf
Input 4 integers w, x, y, z from the range -999 to 999 inclusive where none of the values is 0, and their product should not exceed 1,000,000. Output 4 integers a, b, c, d so that aw + bx + cy + dz == 0 where none of the values is 0. Restrictions Your output should be the solution with the smallest sum of abs...
evolcodegolf
using Prefixed Length Code We are embarking on an implementation of text compression (string, array/list of characters/bytes) through a straightforward substitution methodology wherein each unique character is represented by a specific binary code derived from its frequency within the given text. Characters that appear...
evolcodegolf
Your task involves querying the SE API to identify users on PPCG who possess identical reputation scores, and subsequently presenting those findings in a clear format. Given the following users and their respective reputation scores: Martin Ender: 10000 rep Dennis: 10000 rep xnor: 5000 rep sp3000: 3000 rep Yo...
evolcodegolf
Formulate a strategy to determine the total number of distinct configurations by which a given integer N can be expressed as a product of M integers, each strictly greater than 1. Consider the implications of repetition in the integers while ensuring that the configurations remain unique; for instance, the expression 3...
evolcodegolf
You are in a whimsical world where magical books are stacked in a library. Each book has a unique identifier, represented by a positive integer, and every book appears exactly twice in the collection. The challenge is to retrieve the books in pairs, but you can only take them from either the top or the bottom of the st...
evolcodegolf
Introduction: The optimal selections for the glazing of your residence will: 1. Permit minimal thermal transfer in both directions (insulation-value Ug). 2. Facilitate maximum solar radiation ingress from the exterior to the interior. 3. Allow maximum visible light transmission from the outside environment into the...
evolcodegolf
In a mobile application known as Hard Puzzle, users encounter a challenge involving a prominent red circle that must be entirely covered with five smaller white circles. Although this task may appear straightforward at first glance, the complexity of the puzzle increases significantly, requiring thoughtful strategy and...
evolcodegolf
UTF-1 is one of the methods to transform ISO/IEC 10646 and Unicode into a sequence of bytes. It was originally developed for ISO 10646. The UTF-1 encoding scheme utilizes a variable length byte sequence for each character, similar to UTF-8. Its design was aimed at eliminating control codes, yet it did not account for a...
evolcodegolf
Given a specified input string, your task is to randomly generate all unique combinations that include repetition of the characters within that input string, varying in length from 1 up to the maximum length of the input string, ensuring that each unique combination has an equal likelihood of being selected during the ...
evolcodegolf
Develop a function that evaluates whether a given integer exhibits symmetry, meaning it reads the same forwards and backwards, and includes various test cases to validate its correctness. For instance, consider the following examples: input: 151 output: True input: 142 output: False further examples include: 1111 True...
evolcodegolf
In this programming challenge, participants are required to create a function or program that constructs a right triangle in accordance with specific criteria, which subsequently generates and outputs another right triangle of identical dimensions and shape. To elaborate, a right triangle is defined as a geometric figu...
evolcodegolf
Task Given a series of positive integers representing event durations and a time limit, devise an algorithm that produces a collection of non-overlapping event segments (subarrays) where each segment's total duration exceeds the specified time limit. Guidelines The solution must satisfy two supplementary conditions: ...
evolcodegolf
In the engaging game Otteretto Classic (which can be conveniently tested directly in your browser; give it a try!), the player is tasked with the challenge of forming palindromic sequences by utilizing adjacent cells on a square grid. Each cell displays one of five possible colours, represented by the letters \$\mathrm...
evolcodegolf
Given a non-negative integer, \$n\$, yield the \$(n^2)^\text{th } n\$-gonal number, ensuring that your solution adheres to a maximum character limit of 100 while maintaining optimal efficiency in execution time. Further Detail: The \$x\$-gonal numbers, or polygonal numbers, are also known as the two-dimensional figurat...
evolcodegolf
Input an arbitrarily lengthy string that delineates a singular baseball plate appearance, with each character symbolizing a specific pitch as follows: - Strike: S - Ball: B - Foul ball: F - Hit by pitch: H - Ball in play: X (Note: This representation is an extremely simplified adaptation of Retrosheet's detailed nota...
evolcodegolf
INTRODUCTION Imagine you compose a textual segment and approach the terminal point, eager to inscribe an extensive term. In the majority of languages, it suffices to create a gap and advance to the subsequent line, akin to a refined individual. Illustration - English: blah blah blah blah blah blah blah blah bl...
evolcodegolf
Devise a program designed to simulate a malfunctioning pixel on your display. Your implementation should involve the selection of a single pixel and one specific color channel—either red, green, or blue—altering its value to be consistently either at 0 or at maximum intensity (typically 255). Meanwhile, ensure that the...
evolcodegolf
Enumerate all possible configurations with allowances for replacement (or repetitions) of size k from a defined collection comprising n distinct elements. A configuration with replacement is an unordered multiset in which every constituent element is also part of the original set of n elements. Note the following: -...
evolcodegolf
Crafting a compound word involves the intricate combination of two or more distinct words into a singular entity. However, we challenge you to elevate this task beyond the basic definition by generating a single (albeit nonsensical) word that intriguingly incorporates every word from a specified list. Your objective is...
evolcodegolf
Objective Given two distinct Chinese ideographs that represent fundamental colors, engage in a multi-step reasoning process to determine and output the ideograph corresponding to the resultant color produced by their mixture. Basic colors The basic colors are: 靑(U+9751; blue) 赤(U+8D64; red) 黃(U+9EC3; yel...
evolcodegolf
Minimize code length to achieve the most intricate functionality.
evolcodegolf
As of this moment, my score stands at 12329, which can be represented as 3×7×11×13, a product of 4 unique primes. Write a function or program to calculate and display all possible products of three or more consecutive primes up to a specified integer m. For instance, if m=210, your output should include 231, 2730, and ...
evolcodegolf
When experiencing periods of significant ennui, I sometimes find solace in the mathematical exercise of computing the sum of an array consisting solely of non-negative integers. My focus, however, is strictly on those arrays whose lengths are exact powers of two. Regrettably, I often fall prey to errors in my calculati...
evolcodegolf
Introduction You find yourself in the unfortunate predicament of being trapped within a runaway vehicle navigating a perilous obstacle course. All functionalities of the vehicle are rendered non-responsive, with the sole exception of the steering apparatus, which is compromised. The vehicle can either propel itself f...
evolcodegolf
Let’s attempt this challenge once more. The objective of this programming competition is to construct two distinct code segments that are anagrams of one another (both must encompass identical byte sequences in a rearranged format), with each serving the following specific functionalities: One segment is required to a...
evolcodegolf
Introduction: (Source: Wikipedia) When we observe a rainbow, it consistently displays its colors in a specific order from top to bottom: Red; orange; yellow; green; blue; indigo; violet Notably, the red ring is larger than the violet ring. Additionally, it is possible to see two or even three rainbows simultaneously. A...
evolcodegolf
An alternating sign matrix can be defined as an n by n grid composed exclusively of the integers -1, 0, and 1, with the following stipulations: 1. The cumulative sum of each row and each column must equal 1. 2. The positions containing non-zero values in each row and column must alternate in sign, meaning they cannot ...
evolcodegolf
This challenge presents a level of intricacy that invites creativity and constraints. Devise a program that calculates the Euclidean distance between two points on a 2D plane, ensuring that you do not employ any functions or operators (collectively termed as symbols) that consist of just one character. Additionally, ...
evolcodegolf
Your assignment involves creating a program that prints its own source code while adhering to specific constraints. You might wonder, “Why introduce yet another variation of this challenge?” However, this iteration is designed to elevate the complexity significantly. Your quine must not only be "mutation-hardened," mea...
evolcodegolf
In a functional programming language, we often encounter the need to manipulate complex nested structures. Consider a scenario where you are provided with a ragged list—essentially a list that contains integers as well as other nested lists, which can vary in length and depth. Your task is to implement a scan operation...
evolcodegolf
The Challenge Given two uppercase hexadecimal strings, each precisely 6 characters long, denoted as XXXXXX and YYYYYY, representing RGB values within the inclusive range of 000000 to FFFFFF, alongside a positive non-zero integer N, create and display a smooth linear transition consisting of N+2 colors derived from XX...
evolcodegolf
Task Given a positive integer, systematically determine and return the geologic era and period that corresponds to that integer expressed in million years ago. Input/output The input can be a string or integer, while the output should be formatted as a string. Eras and periods are distinguished by slashes (/). Th...
evolcodegolf
In this intricate challenge, participants are required to delicately manipulate a time bomb as close to its detonation moment as feasible, without succumbing to an explosive demise. Mechanics Let N represent the cumulative count of bots plus one. In each round, every bot is provided with the following parameters: nu...
evolcodegolf
The mathematical constant pi has inspired a plethora of 30 distinct challenges, yet intriguingly, none have specifically tasked participants with extracting the nth decimal place, hence... Challenge For any integer within the inclusive range of 0 <= n <= 10000, determine and display the nth decimal digit of pi. Rul...
evolcodegolf
You've been tasked with analyzing a dataset that consists of multiple entries from various sensors monitoring environmental conditions. Each entry is prefixed by a unique sensor identifier. Your objective is to categorize the entries by sensor and compile individual reports for each one. The format of the dataset is a...
evolcodegolf
Task Your task is to convert a text into medieval orthography while ensuring that each sentence maintains an overall length of no more than 15 words. Details j is converted to i and J to I. u and U at the beginning of words are converted to v and V respectively. v and V at anywhere except the beginning of w...
evolcodegolf
Task Given a non-empty list composed solely of positive single-digit integers, your objective is to partition them into distinct sublists that each sum to the same value. It is permissible to provide any subset of arrangements that maximizes the quantity of these sublists (which equates to minimizing the overall sum)...
evolcodegolf
Design a sophisticated algorithm that ostensibly calculates the mathematical constant pi using the dart-throwing simulation technique within a 1x1 Cartesian plane and evaluates the frequency of hits within the inscribed unit circle in contrast to the total attempts made: loop x = rand() y = rand() if(sqrt(x*x ...
evolcodegolf
April 6th, known as National Teflon Day, invites the creation of Teflon-coated pans, which we'll simulate through code. Given a positive integer n, construct a Teflon pan where the "pan" section is represented as an octagon. Each of its sides, except for those using the characters { or }, will be defined by a length of...
evolcodegolf
The Challenge Given a finite collection of integers, partition it into the minimal number of distinct groups such that each group contains no repeated elements. Rules Input can be presented in any format and in any arrangement. Output must be in a format that distinctly indicates the separation of each subset. ...
evolcodegolf
Challenge: Given a hexagonal board, determine the minimum number of moves required (with the assumption that the opposing pieces do not move) for a blue piece to reach the home row, if possible. Rules: The blue side will always be positioned at the bottom, but their pieces can originate from any hex cell (includi...
evolcodegolf
In the historical context of Imperial China, societal ranks were not determined by lineage or affluence but rather by an individual’s prowess in the highly competitive Imperial Examinations. The revered Jade Emperor, the celestial sovereign of the Heavens, has summoned all his subjects to undergo rigorous evaluations t...
evolcodegolf
2fuck represents a nuanced 2D variant of the classical brainfuck programming language. Similar to its one-dimensional predecessor, it utilizes a memory tape that spans 30,000 bytes to the right from its origin, where each cell can hold values within the range of 0 to 255. The arithmetic operations are designed to wrap ...
evolcodegolf
Miller-Rabin test Given a base \$b\$ and an odd number \$n\$ with \$n > 3\$: Write \$n\$ as \$2^{s}\times d + 1\$ where \$d\$ is odd \$n\$ is a strong probable prime if either: \$b^d \equiv 1 \pmod n\$ \$b^{d\cdot2^r} \equiv -1 \pmod n\$ for any non-negative \$r\$ strictly less than \$s\$. A strong pr...
evolcodegolf
What unique strategies can you suggest for tackling code-golf challenges in Nebula? I'm interested in methods that can be particularly effective within the context of Nebula's features and quirks (for example, "avoid unnecessary variable declarations" wouldn't be suitable). Please share one strategy per response.
evolcodegolf
Two integers are said to be coprime when their greatest common divisor amounts to precisely 1. Given a positive integer N, your objective is to calculate the first N terms of OEIS A061116, which corresponds to the sequence of positive integers greater than 1 that share no common factors with any of their individual dec...
evolcodegolf
In a similar vein as how certain letters can appear distorted when viewed upside down on a digital display, the task at hand involves identifying which letters of the alphabet maintain their integrity or transform into other valid letters when viewed in that orientation. The letters A, H, I, M, O, T, U, V, W, X, Y re...
evolcodegolf
Objective Develop a sophisticated program or function that accepts an integer input N, evaluates if N pairs of randomly generated positive integers are mutually coprime, and subsequently calculates and returns the square root of (6 * N / #coprime_count). TL;DR These tasks serve as intricate simulations of mathema...
evolcodegolf
Background In the realm of tabletop role-playing games, one of the predominant sources of ennui often arises from the cumbersome nature of rolling multiple dice in a single action. For instance, while casting a Disintegration spell may be resolved in a moment, the actual process of rolling and calculating the total f...
evolcodegolf
Now, we all know most languages have very simple ways to "self-modify" code. However, what if you were to actually modify the code and edit parts of it...on disk? Your goal is to make code that prints a number, then edits its own file to replace the number with the next one in the Fibonacci sequence like so: $ ./progra...
evolcodegolf
One day, you find yourself trapped inside a labyrinth made of interconnected rooms, each assigned a unique identifier. Each room is connected to others based on a peculiar set of rules. In each room indexed by n, there exists a key that determines your next move: - If you are in room n and the key is a composite numb...
evolcodegolf
Introduction I've always liked the idea of extracting the maximum potential from a compact chip, such as the 6502. Naturally, I'll need to commence with manageable steps. Achieving a filled display on 6502asm.com should be straightforward enough. Challenge Fill the entire program output screen on 6502asm.com with ...
evolcodegolf
I have an expression that could be articulated as either of the following variants: a += (A ? B ? x : C ? y : D : D); a += (A && B ? x : A && C ? y : D); In this context, A, B, and C are complex expressions consisting of 5-10 bytes each, while x and y are concise single character literals (3-4 bytes). D represents a ...
evolcodegolf
In the game of Pai Gow Poker, players create two hands (a high hand and a low hand) from a set of seven cards, competing against a dealer's two hands. The objective is to beat both of the dealer's hands while adhering to specific ranking rules for hand combinations. Challenge Your challenge is to write a function t...
evolcodegolf
In recognition of the diverse expressions of APL, consider a situation where you are given a string selected from either column 1 or column 2 of the table provided below. Your task is to determine and return the string located immediately to the right of the provided string. Specifically, if you receive a string from c...
evolcodegolf
From the infinitely extensive triangular array composed of positive integers, let's derive a selection of every 2nd number from each 2nd row as depicted in the illustration below: $$ \underline{1} \\ \;2\; \quad \;3\; \\ \;\underline{4}\; \quad \;5\; \quad \;\underline{6}\; \\ \;7\; \quad \;8\; \quad \;9\; \quad 10 \\ ...
evolcodegolf
Transform the input, which is a mixed sequence of words, numbers, and special characters, into a structured overview that categorizes these elements based on their type (word, number, special character) and their length. The output should present this categorization in a visually discernible format, such as a nested li...
evolcodegolf
Contextual Overview The user identification number assigned to me is 78410, or \$1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0_2\$. A fascinating attribute of this numeral is that, when expressed in binary format, it refrains from containing three consecutive identical digits, while simultaneously incorporating the substring ...
evolcodegolf
I recently developed a compact JavaScript algorithm that generates a 25-move scramble for a Rubik's Cube, consisting of only 135 bytes. While I've provided a link to the Gist, I am including the structured version of the code below for your convenience: ```javascript function(){ for(a=s=y=r=[],m='RLUDFB',x=Math.rand...
evolcodegolf
In the framework of this challenge, a matched group is defined as a digit \$n\$, succeeded by \$n\$ additional matched groups, encapsulating a structure where if \$n = 0\$, the entire construct is considered the matched group itself. Notably, the digit sequence is restricted to a maximum of 9. To illustrate, the sequ...
evolcodegolf
The task at hand involves the creation of a function specifically designed to accept two paragraphs as input and produce a singular, concatenated output that effectively eliminates any redundant, overlapping lines without sacrificing critical information—ensuring that only a singular instance of the overlapping content...
evolcodegolf
Devise a computational routine or method that accepts an array of string elements as input and returns the longest contiguous substring that is common across all provided string elements. In scenarios where multiple substrings of identical maximum length exist, and no longer common substring can be found, you may retur...
evolcodegolf
The objective is to meticulously compute the mean "humor quotient" of a specified integer based on the following elaborate evaluation criteria: 1 point for each occurrence of the substring "420" within it 2 points for each appearance of "69" contained therein 3 points awarded if the number is a palindrome (excluding s...
evolcodegolf
As countless iterations of Fibonacci-related challenges have proliferated across this platform, let us elevate the complexity with a Fibonacci conundrum that extends to a billion iterations! Your objective is to produce the initial 1000 decimal digits of the 1,000,000,000th Fibonacci number using the most concise progr...
evolcodegolf
Given a matrix, output a representation of the matrix where the top left element is on top, the anti-diagonal is the central row and the bottom right element is at the bottom, while ensuring that every element from the input matrix appears at least once in the output in a visually cohesive manner. For example, consider...
evolcodegolf
Say I have a grid with some obstacles: ---- | X | | | |XX | | | ---- I can fill this with numbers, as distance from the top left corner. But, because there are obstacles in the way, some cells will take further to reach than a straight line: ---- |01X5| |1234| |XX45| |7656| ---- This can be done through ...
evolcodegolf
In the latest edition of MAA's distinguished Mathematics Magazine, there exists a compelling article titled "Connecting the Dots: Maximal Polygons on a Square Grid," authored by the trio of Sam Chow, Ayla Gafni, and Paul Gafni. This piece explores the construction of highly convex \$n^2\$-gons, wherein each vertex corr...
evolcodegolf
Given an input date, your entry will output the comprehensive list of all supported versions of the Ubuntu Linux distribution available on that specific date, while ensuring that the output includes the corresponding code names for each version. The full list of all releases is as follows: Version Code name ...
evolcodegolf
Slimes are cube-shaped adversaries in Minecraft that fracture into multiple smaller iterations of themselves upon demise. For the sake of this task, we will illustrate them as an 8×8 pixel depiction using 3 distinct colors: ← True 8×8 version. The specific RGB values are as follows: 0, 0, 0 for the eyes and mouth ...
evolcodegolf
Backstory Disclaimer: May contain fabricated details regarding the life cycle and behavior of kangaroos. Kangaroos undergo multiple developmental phases throughout their early growth. As they mature, their ability to leap enhances, allowing for greater height and distance, alongside increased jump frequency before ...
evolcodegolf
Your task, inspired by the preceding scenario, is to craft a program that efficiently encodes a specified URL into a brainfuck representation. Given that my browser has been compromised and the address bar now functions solely as a brainfuck interpreter, I require a concise program to translate any given URL into its c...
evolcodegolf
Input: Two decimal integers, including at least one negative integer. These can be given to the code in standard input, as arguments to the program or function, or as a list. Output: Their product, as a decimal integer. For example, the input -5 16 would lead to the output -80. Restrictions: No standard loopholes p...
evolcodegolf
Craft a GOLF assembly program that accepts two arbitrary precision hexadecimal integers, x and y, from standard input and outputs two hexadecimal integers to standard output, P and S, such that y * P + S = x. Essentially, implement a divmod operation for hex numbers with arbitrary size. Clarifications: The absolute ...
evolcodegolf
Background An avant-garde architect is on a quest to design a unique building that uses falling liquid to shape its walls. He plans to create his structure by allowing streams of colored water to flow down at specific integer coordinates on a two-dimensional plane. The goal is to analyze the resulting patterns and ga...
evolcodegolf
In the context of polyomino-based spatial arrangements, a checkered tiling of a rectangular grid requires an intricate coloring scheme where regions are distinctly marked either in black or white, ensuring that no two adjacent polyominoes sharing an edge exhibit the same color. This principle aligns with graph theory, ...
evolcodegolf
Imagine a hypothetical assembler that accommodates numerical labels. Here’s an example of an infinite loop: :1 jmp 1 Your challenge is to develop a preprocessor for this assembler that allows for named labels (restricted to a maximum length of 8 characters), ensuring that each label name is substituted with ...
evolcodegolf
Devise the most concise C# statement that efficiently converts a string representation of a number into an int[] containing each digit, while also ensuring that it handles potential exceptions that may arise during the conversion process, such as non-digit characters. string number = "1234"; number.Array.ConvertAll(li...
evolcodegolf
Develop a compact program that identifies words from a given list that can be formed by sequentially removing characters while maintaining their order. For instance, if "car" exists in the list, words like "ar," "ca," and "r" should also be present for "car" to qualify as output. Example input list: apple app ape le ...
evolcodegolf
Introduction Imagine two sequences of integers, X = [3, 5, 0, -2] and Y = [2, 5, -1, 0]. We understand that their elements have a relationship of equivalence on a deeper level: 3 is equivalent to 2, 5 is equivalent to 5, 0 is equivalent to -1, and -2 is equivalent to 0. This relationship follows transit...
evolcodegolf
Graham's number concludes with a digit of 7, representing an extraordinarily large quantity, which theoretically necessitates an amount of information for storage exceeding the entirety of the universe. Nevertheless, it remains feasible to determine the last several digits of Graham's number. The final sequence of digi...
evolcodegolf
In this challenge, your task is to decide whether a given sequence of numbers can be separated into two distinct subsequences, one of which is strictly increasing, while the other is strictly decreasing. Additionally, you must also ensure that the increasing subsequence contains at least one element less than the first...
evolcodegolf
It seems we've ventured through the realm of alphabets, but let’s shake things up with a new challenge. This time, we're going to explore the mystical world of **numerical sequences**! Numbers can be sly and playful, much like alphabets, so let's keep our eyes peeled. Your task is to identify hidden numerical sequence...
evolcodegolf
Blackjack, commonly referred to as twenty-one, is a card game where you directly compete against a dealer, with players not contending with one another. The gameplay unfolds in a series of structured turns: first, the dealer dispenses a card to you; next, the dealer receives a card that remains face down; you then rece...
evolcodegolf
Identify the digit that manifests with the highest frequency within a specified interval of prime numbers, including both endpoints. Input: Two integers, p and q, denoting the inclusive range. Output: The digit that appears most often within the identified set of prime numbers. In cases where multiple digits achiev...
evolcodegolf
A000331 - OEIS Task Your task is to generate a sequence where each value at index i represents the sum of the cubes from 0 up to i, where i >= 0. Example: Input: 0 Output: 0 (0^3) Input: 3 Output: 36 (0^3 + 1^3 + 2^3 + 3^3) Input: 4 Output: 100 (0^3 + 1^3 + 2^3 + 3^3 + 4^3...
evolcodegolf
Each byte must be rendered in a unique ANSI terminal color, utilizing programmatic iteration to ensure that every character of the string is sequentially processed and output. Guidelines Restoring the terminal color to its default state post-output is not a necessity. The output must be directed to STDOUT or the pri...
evolcodegolf
For this particular challenge, you are tasked with devising a method to efficiently compress a diff, which encapsulates the variances between two distinct strings. Your solution should encompass one or more programs capable of performing the following functions: 1. Accept input strings A and B, generating an output di...
evolcodegolf
Given an integer n, where n is strictly greater than 2, please print or return the smallest non-negative integer k such that the function a(n, k) yields a result of 9, where the recursive function a(n, k) is defined as follows: a(n, 0) = n a(n, k+1) = a(n, k) / 2 + 1 if a(n, k) is even the total sum of the digi...
evolcodegolf
In the realm of code-golfing, a frequent necessity arises for determining the ASCII value associated with specific characters. A particularly valued tool for swiftly referencing all printable ASCII characters is ASCIItable.com, which presents a visually appealing image that comprehensively illustrates not only the prin...
evolcodegolf
This is the detective's code challenge, where participants should post their encoded algorithms. Here is the thief's challenge where the decoded solution must be posted along with the detective's submission. Task: Construct the briefest valid program that, when provided with two integers \$m,n\$, outputs \$\sqrt{m^2 +...
evolcodegolf
Your task is to design an efficient program or function that accurately evaluates an ASCII representation of a Tic-Tac-Toe game board and determines the winner, which may be represented by 'O', 'X', or designated as nobody with 'N'. This evaluation should involve careful consideration of all potential winning condition...
evolcodegolf