instruction_seed
stringlengths
29
40.5k
source
stringclasses
6 values
Nuggets of Code: A Quantitative Conundrum Picture a scenario unfolding on a Friday evening, where you have summoned your regular cohort of golfing aficionados to partake in your cherished pastime: code golfing. Given the mentally taxing nature of this activity, procuring some sustenance becomes imperative to sustain ...
evolcodegolf
This: is a Glider. In Conway's Game of Life, the glider is a famous pattern that rapidly traverses across the board. For today's challenge, we are going to draw an ASCII art Game of Life Board, and place a glider on it. The board we are starting with is this: |_|_|_|_|_|_|_|_|_|_| |_|_|_|_|_|_|_|_|_|_| |_|_|_|_|_|_|_|...
evolcodegolf
Consider the whimsical question: Why is the number 6 intimidated by the presence of 7? The humorous answer is that 7, in an act of consumption, devoured 9! Now, given a particular string, please execute the following transformations through a systematic approach: 1. Whenever a 6 is directly adjacent to a 7, eliminate ...
evolcodegolf
At a United Nations conference, two ambassadors find themselves in a situation where they wish to converse, yet each ambassador is restricted to a single language, which unfortunately differs from the other’s. Thankfully, a number of translators are available, each possessing proficiency in a limited selection of langu...
evolcodegolf
Challenge The primitive circle problem poses an intriguing mathematical question concerning the determination of the count of coprime integer lattice points \(\$x,y\$ in a circle whose center is situated at the origin and possesses a radius \(\$r \in \mathbb{Z}^+\$, such that the condition \(\$x^2+y^2 \le r^2\$ holds...
evolcodegolf
Given, in any configuration or sequence, specific dimensions (in any arrangement you prefer) a defined probability (in any representation you select) the total number of iterations (you may determine whether to include the initial configuration or not) execute one of the following actions: animate, or output...
evolcodegolf
Create a function that accepts a numeric input and transforms it into a palindrome by appending the least possible digits, while ensuring that the function can handle numbers of up to 100 digits and maintains a record of the number of digits added in the process. Sample Inputs 12 122 232 2323 1012121 Samp...
evolcodegolf
In order to avoid any misconceptions with the concept of Password Bishop Goodness, your task is to evaluate a given string and determine its status as a password that possesses strength against bishops, responding with either a truthy or falsy indication, or providing two consistent values in that context. A password a...
evolcodegolf
This is a puzzle: |. Imagine a sequence of letters that can be divided into a perfect pair of symmetric sequences. Take the example "deified". If we analyze the structure, we can split it into two identical parts around a central mirror: dei <--> eid Thus, placing a mirror in the center yields the new structure: dei...
evolcodegolf
It pertains to the concept of Restricted Integer Partitions, specifically focusing on the highest permissible value in the partitioning process. Inquiry You are presented with three distinct positive integers. The initial integer denotes the value to be divided, the subsequent integer specifies the desired length of ...
evolcodegolf
Some time ago, the following question was asked: GolfScript, CJam, or Pyth? Based on the title only, I thought that it would be a very nice challenge, but unfortunately, it turned out to be a question asking for tips. Here is the challenge I wanted to read: Who said golfing languages were not used in the Real World? A...
evolcodegolf
Explore a sequence of numbers from 0 to n-1, representing a directed graph where each number points to its designated index in a given array. For instance, for n = 5 with the array [3, 0, 4, 1, 2], the mapping can be visualized as 0 → 3, 1 → 0, 2 → 4, 3 → 1, and 4 → 2. This configuration creates distinct paths where nu...
evolcodegolf
Given a polynomial, identify all of its unique roots within a specified interval. A polynomial is expressed in the form ax^n + bx^(n-1) + ... + dx^3 + ex^2 + fx + g, where each term consists of a coefficient and a nonnegative integer power of x. The highest power with a nonzero coefficient is referred to as the degree....
evolcodegolf
Problem: Given a string representing a mathematical expression that incorporates constants such as pi, e, psi, and i, as well as basic arithmetic operations (+, -, *, /), parentheses, fractions, and exponentiation, develop a program or function that systematically converts this string into its corresponding LaTeX code ...
evolcodegolf
Morpion solitaire This is a game that I distinctly recall learning from my grandparents during my formative years. Initially, I was unaware of its designation. G B has recognized it as Join Five (or, more clearly defined, Morpion solitaire) with a slightly altered starting configuration. NOTE: It appears to be some...
evolcodegolf
Consider three distinct sets A, B, and C, each composed of n unique integers. From these, we derive the resulting set S_n = {a * b + c | a ∈ A, b ∈ B, c ∈ C}. For any integer n, one or more minimally sized S_n can be generated based on the specific integers chosen for sets A, B, and C. The elements of these sets may...
evolcodegolf
You will receive a string comprising a sequence of printable ASCII characters. Your task is to methodically traverse through the string and randomly alter the letters with a uniform probability of 50% to convert certain lowercase letters to uppercase while simultaneously transforming all other characters to lowercase. ...
evolcodegolf
## Lexical Mirrors, 197 bytes Lexical mirrors are pairs of words that maintain distinct meanings but are formed by reversing each other's letters. Unlike semordnilaps, which can be phonetic synonyms, lexical mirrors must not share a similar pronunciation. For example: God <=> Dog (not valid as both convey a religious...
evolcodegolf
Definition Establish the nth array of the CURR sequence as delineated below. Commence with the singular element array A = [n]. For every integer k present in A, substitute the entry k with k natural numbers, enumerating sequentially from 1 to k. Reiterate the preceding step for a total of n - 1 additional times....
evolcodegolf
This problem originates from NCPC 2005. Roy is faced with the challenge of maximizing the number of electrical outlets in his apartment, which is equipped with only a single outlet, while possessing a collection of various power strips. Your task is to calculate the absolute maximum number of functional outlets achieva...
evolcodegolf
The task at hand involves the following: Devise a program or a function that accepts a positive integer as input and outputs its factorial, while also ensuring that it handles potential edge cases effectively. Note: This is a code-trolling question. Please do not take the question and/or answers seriously. More infor...
evolcodegolf
It has come to my attention that the cmp function is often regarded as a valuable tool in the context of code-golf challenges. However, it is worth noting that Python 3 lacks the traditional cmp function. Given this situation, could you provide insight into the most concise alternative implementation or equivalent func...
evolcodegolf
In the world of Minecraft, the inherent item textures are characterized by their simplistic design, presented as 16×16 pixel images, which surprisingly aligns with the concept of golfing. Below, you'll find augmented representations of the five fundamental diamond tools in Minecraft: the pickaxe, shovel, axe, sword, an...
evolcodegolf
Your task is to reorder a string based on a custom priority defined by a sequence of letters. Rather than following conventional alphabetical rules, you will create a program or function that takes two inputs: a priority string P and an input string T. Both will consist exclusively of lowercase English letters, and bot...
evolcodegolf
**Introduction** The creative mind of local artist Clara's Visual Journey recently inspired us with a quest to reconstruct the rhythm of an image. For optimal participation, it’s advisable to peruse her intriguing proposal beforehand, but here's a concise summary of the primary elements: The rhythm of an image can...
evolcodegolf
Provide a positive integer \$n\$, and determine all integers \$b\$ (where \$1 < b < n - 1\$) such that the value of \$n\$ can be expressed as the summation of an arbitrary number of consecutive powers of \$b\$. For example, when considering \$n = 39\$, we find that \$3^1 + 3^2 + 3^3\$ equals \$3 + 9 + 27\$, yielding \$...
evolcodegolf
Task In the context of a Boolean matrix, your objective is to identify one or potentially several subsets of rows wherein each column contains precisely one True value. You are encouraged to implement any algorithm of your choice, with the stipulation that it must be capable of efficiently processing very large matri...
evolcodegolf
The challenge Given two integers as input (x and y), output x as a string with the requisite number of leading zeroes added to ensure that the total length of the string is precisely y characters long, while deliberately omitting any consideration of the sign. Rules If x contains more than y digits, output x as ...
evolcodegolf
It’s just another Wednesday, and I need a boost. Draw me a whimsical forest. The fewer the details, the better! Take no input and generate this image precisely: ``` /\ / \ /____\ / \ /________\ | ~ ~ | | o o | | ∆ | |__________| ``` Craft me a ...
evolcodegolf
The exploration of hexagonal grids has gained considerable traction in recent computational challenges centered around two-dimensional data structures. However, intriguingly, the equally fascinating domain of triangular grids has received minimal attention thus far. I aim to address this oversight by presenting a strai...
evolcodegolf
The natural numbers, inclusive of zero, are rigorously articulated as sets through a systematic definition: The number 0 is represented by the empty set, denoted as {} For any integer n greater than or equal to 0, the number n+1 is defined as the union of n and the set containing n, expressed as n ∪ {n}. This results...
evolcodegolf
It is likely that many of you are familiar with the renowned Turtle Graphics program, which gained significant attention through its association with Logo. Your task is to create a Turtle Graphics implementation in a programming language of your preference, adhering to a set of intricate specifications. Guidelines: ...
evolcodegolf
To fully engage with the unique challenge presented, you are tasked with carefully selecting one word from the provided dictionary of 4-letter words that exclude any repeated characters. Subsequently, you are to output this chosen word utilizing the distinctive block letters format outlined below, ensuring that the ren...
evolcodegolf
Numbers classified as squares manifest in the mathematical form of \$n^2\$ where \$n\$ is designated as an integer. They are frequently referred to as perfect squares due to the fact that their square root yields an integer value. The initial series of 10 square numbers is documented as follows: (OEIS) 0, 1, 4, 9, 16...
evolcodegolf
**Prelude** In the festive melody, The Twelve Days of Christmas, the narrator is graced with a sequence of gifts that accumulate with each passing day. The composition is structured such that with each verse, a new present is added, incrementing the quantity progressively. One Partridge, Two Turtle Doves, Three Frenc...
evolcodegolf
Formulate a methodology to Initiate with a specified integer n, comprising n instances of the digit one (for example, if n equals 4, commence with 1 1 1 1). Subsequently, compute the cumulative sum of the most recent n entries, and iterate this procedure. For n equating to 4, the sequence unfolds as follows: Begin ...
evolcodegolf
Consider: d=(x,y)=>(parseFloat(x)||0)+(parseFloat(y)||0) Although this function works, I believe it can be condensed even further. If either input is a string, and the other is a valid number (integer or float), return the number. If both inputs are strings, return 0. If both inputs are valid numbers, return their s...
evolcodegolf
You recently found yourself entangled with a questionable gambling website that, upon a payment of 25 dollars, promises to reimburse you a seemingly random sum between 0 and 50 dollars. After receiving the amount of 5 dollars on two separate occasions, you resolve to substantiate your belief that the site is fraudulent...
evolcodegolf
Envision a sophisticated 24-hour clock interface that is navigable using the arrow keys, represented as follows: ╔══╗ ┌──┐ ║00║:│00│ ╚══╝ └──┘ HH mm Initiating with two presses of the up arrow (↑↑) will increment the currently highlighted hour input: ╔══╗ ┌──┐ ║02║:│00│ ╚══╝ └──┘ HH mm Utili...
evolcodegolf
Challenge Develop two distinct programs, referred to as A and B, in separate programming languages. The critical requirement is that the output generated by program A must precisely replicate the code of program B, and conversely, the output produced by program B must correspond exactly to the code of program A. It's...
evolcodegolf
You are the manager of a small pizza shop where each day you prepare 50 pizzas. However, the number of pizzas customers order fluctuates wildly from day to day. Sometimes, you sell out entirely, and other times you have leftover pizzas. These leftover pizzas can be stored for one additional day before they must be disc...
evolcodegolf
What general tips do you have for golfing in 1+? I'm seeking ideas that can be applied to code-golf problems and which are also at least somewhat specific to 1+ (e.g. "remove unnecessary whitespace" is not an answer). Additionally, please ensure that each suggestion includes an example demonstrating its application. Pl...
evolcodegolf
Gazing from the vantage point of my attic window into my neighbor's backyard, I observe an intriguing scene: a dog tethered to a post at the very heart of the yard. This canine traverses the expanse but remains perpetually at the limit of its chain, resulting in a distinctive trail imprinted in the dirt beneath. Typica...
evolcodegolf
Inspired by an inquiry posed on Stack Overflow, for which the title bears my own oversight. The challenge Given an array of positive integers consisting of a minimum of two distinct elements, transform each element into the smallest value among all other entries while excluding itself. Test cases [4, 3, 2, 5] -> [...
evolcodegolf
Your assignment entails a challenging exploration of a straightforward regular expression wherein you are required to calculate the total number of strings of a specified length n that possess a complete match of that exact length with the provided uncomplicated regex. This exploration will exclusively target a curated...
evolcodegolf
Introduction I've always been captivated by the pursuit of extracting maximum performance from the compact architecture of a microprocessor like the 6502. Naturally, my journey must commence with modest ambitions. The task of populating the display on 6502asm.com appears to be a straightforward starting point. Chal...
evolcodegolf
In the study of geometric figures, a tangential quadrilateral is defined as a quadrilateral that has an incircle, which means that it can touch a single circle internally at each of its sides. This unique property necessitates that the sums of the lengths of opposite sides are equal. For further insights, refer to the ...
evolcodegolf
Imagine you have a configuration file called settings.json containing sensitive information like API keys and passwords. You want to share the structure of this JSON file in a presentation without revealing the actual values. Provide a concise command line that will read the settings.json file and mask all values, repl...
evolcodegolf
Transform a matrix composed of strictly positive integers into a modified structure by enveloping it with zeros! The method for achieving this transformation involves the strategic addition of zeros surrounding each individual element, as well as enclosing the entire outer border with zeros. Input and output formats m...
evolcodegolf
Mr. Seckington operates a mobile grocery venture, traversing the local villages in his van to market his various agricultural goods. In order to accurately determine the prices for his customers, he requires a systematic approach to weigh his products. Given the limited space in his vehicle, he employs a unique configu...
evolcodegolf
Max/MSP is a visual programming environment often used for audio synthesis and interactive multimedia. While it excels in creative applications, its structure can complicate concise coding techniques, making it a unique challenge for minimalist coding competitions. What strategies can be employed to streamline code and...
evolcodegolf
Your task is to accept a "password" input from the keyboard or standard input while adhering to specific constraints. Challenge: Read a string s invisibly. For each of the characters in s, print a character c. In real-time. Rules: You must print c in real-time. As soon as the user enters a character, you...
evolcodegolf
Introduction Let's take the number 180. This is an interesting number because the sum of digits of this number is equal to: 1 + 8 + 0 = 9 And the squared version of this number, or: 180² = 32400 > 3 + 2 + 4 + 0 + 0 = 9 These are both 9. The sum of digits of the original number and the squared number are the...
evolcodegolf
Engaging in a match of Rock-Paper-Scissors-Lizard-Spock, your superior robotic reflexes enable you to anticipate your opponent's chosen throw prior to their execution. Your objective is to strategically select a winning throw that outperforms theirs, all while adhering to the constraints of minimal byte usage. As a rem...
evolcodegolf
Engaging in a playful yet intricate contest akin to a cops-and-robbers scenario, the Robbers' Thread is accessible here. Your task is to devise a program that generates an anagram of its own source code, ensuring it does not reproduce the original source code verbatim. For illustration, consider the following Python pr...
evolcodegolf
Your task is to derive the empirical formula for the resultant ionic compound formed from two specified ions: one positively charged and the other negatively charged. The primary objective is to achieve a neutral charge by carefully balancing the ionic charges until they equal zero. While you need not focus on formatti...
evolcodegolf
This problem draws parallels to the process of prime factorization, where one identifies the smallest prime constituents of a number (for instance, 8 = 2 x 2 x 2). However, your task here is to produce an array or list containing the smallest composite factors of any specified positive integer n. Should n be a prime nu...
evolcodegolf
In the spirit of seasonal festivities, while I’m not gearing up for Christmas myself, my friend across the street certainly is, and they've enlisted my help. They possess an overwhelming collection of holiday ornaments, but they can’t figure out which are genuine collectibles versus the more common pieces. Their coll...
evolcodegolf
In this intricate cops-and-robbers challenge, the law enforcement officers will select a positive integer of their choosing. They will subsequently develop a program or function that produces a distinct output when supplied with this specific number as input, while generating an alternative output for all other positiv...
evolcodegolf
Initiating with a binary list containing solely 1s and 0s, we will simulate the movement of a ball across this sequence. The ball possesses a specific position and direction, and during each iteration, it follows a defined set of rules: 1. If the value at its current position is 1, it reverses direction, effectively "...
evolcodegolf
Design a script that initially outputs "Greetings, Universe!" in p bytes. By modifying q bytes, the program should subsequently display all even numbers within the range 10 <= y <= 30. Altering r bytes next should result in the code producing the following triangle in ASCII-art: ``` /\ / \ /____\ ``` After changing...
evolcodegolf
Create a program that takes each word you provide as input, and for each word, appends that word to itself without its first letter, then continues this process, removing the subsequent leading letters in each iteration until no letters remain. For example, the word "cat" transforms into "catatt," while "hello" evolves...
evolcodegolf
Identify all integers that, when combined with their respective doubles and triples, collectively encompass each digit from 1 to 9 exactly one time without any repetition. Specifically, explore the properties of such numbers and provide comprehensive sets demonstrating this characteristic. No input. Output: 192 3...
evolcodegolf
The Goodstein sequence, a fascinating mathematical construct, is defined for a given starting number through a series of intricate transformations. To initiate this process, begin with an integer n and set the base b to 2. The sequence generation involves the following steps: 1. Express the number n in hereditary base...
evolcodegolf
There exists a straightforward cipher that systematically transforms a letter into its corresponding position within the English alphabet. For instance, the string "abc" would be encoded as "1 2 3" using this specific ciphering method. This task introduces an alternative and more intricate approach to this fundamental ...
evolcodegolf
Introduction While IPv6 has become the standard for internet addressing, its representation can often be complex and confusing. In addition to the simplifications allowed for IPv6 addresses, an even more intriguing method exists in RFC 3378, which uses a unique identifier format for mobile nodes. This format is not c...
evolcodegolf
Part of the Code Golf Advent Calendar 2022 initiative. Refer to the associated meta post for further specifications. As the festive season approaches, Santa finds himself straying from his intended nutritional regimen this year. Given his increased girth, he has tasked the elves with compiling an inventory of all the ...
evolcodegolf
Room Number Locator I have encountered a perplexing challenge at my workplace when a colleague sends me an incorrect room number for a meeting. Frequently, as I head to a meeting, a team member, perhaps hurrying through their tasks, inadvertently provides a wrong room number due to a slip of the fingers on their keyb...
evolcodegolf
Design a function that generates a 3D ASCII art representation of a cube, with each face using the hash symbol (#). The cube should be represented in an isometric view and should accommodate a specified size parameter, which defines the edge length of the cube. The size parameter must be a positive integer greater than...
evolcodegolf
I am tasked with preparing cardboard digits to exhibit a certain number (example). While I lack specific knowledge about the number in advance, I am informed that it does not exceed n. Additionally, I must ensure that I can also display numbers that require more than one digit in their representation. How many cardbo...
evolcodegolf
As part of the Advent of Code Golf 2021 event, and closely related to the problem from AoC2020 Day 3, you're embarking on a journey through a uniquely structured forest while navigating with an airplane. Due to specific biological and geological factors, this forest contains trees that grow strictly at precise integer ...
evolcodegolf
The task at hand presents a straightforward challenge: Given an integer input n, your goal is to generate and return the n x n identity matrix. The identity matrix is characterized by having 1s stretching from the top left corner to the bottom right corner, with all other entries being 0s. You are required to devise a ...
evolcodegolf
I possess a profound appreciation for pizza, an emblematic dish! Task Given the radius of a pizza and a curated list of ingredients, devise the corresponding ASCII representation of the pizza! Example size 4 pizza adorned with mozzarella cheese, olives, and ham: ##### #@@@@M# #H@O@@@@# #M@@@H@@# #@OO@@@@# #@@H@...
evolcodegolf
Design and implement a quine that, rather than reproducing its original source code verbatim, outputs the same source code organized according to QWERTY keyboard sorting principles. What precisely constitutes QWERTY sorting? QWERTY sorting entails the arrangement of characters based on their positions on a standard Q...
evolcodegolf
Craft a program or function in any programming language of your choice that generates the specified intricate pattern: ~|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||~ |~|||||||||||||||||||||||||||||||||||||||||||||||||||||||||~| ||~|||||||||||||||||||||||||||||||||||||||||||||||||||||||~|| |||~|||||||||||...
evolcodegolf
Meta discussion: Can one reasonably argue that the phrase "(The other day) I met a bear" constitutes a duplicate entry in terms of content or context? 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....
evolcodegolf
In a distant realm where the artistry of cutting shapes defines the fate of realms, you are tasked with designing a fantastical maze composed of intricate and enchanted lines. Each line has its own mystic properties and varying costs based on complexity. Here’s how the system works: INPUT: A 3D labyrinth represented a...
evolcodegolf
I'm currently in the midst of crafting an innovative space station tailored for standard super-villain enterprises (including, but not limited to, a megalaser), yet I'm encountering significant difficulties in the design of the solar panels. My exceptional cadre of scientists possesses the capability to precisely cal...
evolcodegolf
If you are not already acquainted with the principles of Braid Theory, it is highly advisable that you familiarize yourself with this foundational knowledge beforehand. This inquiry presupposes that you possess a solid understanding of the concepts involved, particularly with a thorough grounding in group theory. Let ...
evolcodegolf
The Task In this challenge, your objective is to develop a program that outputs a randomly selected anagram of its source code, ensuring a uniform distribution, while explicitly avoiding any instance where it reproduces itself. Elaboration Without taking any input, your program should generate one of the anagrams ...
evolcodegolf
Elucidate the concept of the Permutation Coefficient. Permutation embodies the methodology of systematically arranging every element within a specified collection to create an ordered sequence. The total number of distinct permutations derived from a set comprising n elements can be determined by the factorial notati...
evolcodegolf
Design a program that takes a word as input and produces an audio file that plays the corresponding morse code for each letter in a rhythmic pattern, incorporating elements of a nursery rhyme melody in the background.
evolcodegolf
In-depth Exploration of Zeckendorf Representations Utilizing Base Fibonacci Numbers This unique numeral system leverages Fibonacci numbers as its base, where digits consist solely of 0s and 1s; here, each '1' signifies the inclusion of the respective Fibonacci number, while '0' indicates its exclusion from the summatio...
evolcodegolf
The implementation must initiate with two distinct files, referred to as "a" and "b". These files should exemplify what I define as inverse quines: executing "a" must yield the source code of "b", while running "b" must produce the source code of "a". For illustration: ```bash ./a #source code of b, optionally followed...
evolcodegolf
A quintessential illustration to introduce individuals to the intricate notion of a discrete probability distribution is the bean machine apparatus. This mechanical device features numerous marbles cascading down through a constricted aperture located at the top, subsequently striking a series of interleaved pins. At e...
evolcodegolf
Please provide the screen resolution of the device in the precise format of [width]x[height] (without the brackets). Additionally, consider explaining how you arrived at this resolution based on the device specifications or settings. For instance, an output could be 1440x900. Here's an online tester that you can utiliz...
evolcodegolf
A block of textual information is provided, which incorporates a mixture of numeric values and alphabetical characters. Your objective is to meticulously organize the content by aligning all numeric elements to the left side while positioning the alphabetical characters on the right side, maintaining the original seque...
evolcodegolf
This task involves creating an interpretation framework for a brainfuck variant specifically designed to output the Largest Number Printable, as well as additional functionality. Consider a brainfuck interpreter that is engineered with: - An array capable of expanding both leftward and rightward to accommodate an arb...
evolcodegolf
The concept of Quines is intriguing, and the notion of Polyglots adds another layer of complexity. Not only do Polyglot Quines exist, but we can also elevate the challenge to a new level of sophistication. Construct a file that encompasses a valid program across three distinct languages: α, β, and γ. When executed as...
evolcodegolf
Background The twelve-coin problem is a classic balance puzzle commonly used in job interviews. The puzzle first appeared in 1945 and was posed to my father by my grandfather when he asked to marry my mother! In this intricate puzzle, there are twelve coins, one of which is either heavier or lighter than the others (...
evolcodegolf
It's time to engage in a perilous game of Russian roulette! The foundational rules are deceptively straightforward: utilize a revolver outfitted with n chambers, housing a single live round, aimed at your own head, and you may just evade mortality! However, this iteration of the classic Russian roulette conundrum diver...
evolcodegolf
Devise a program that causes a snake to navigate and fill any given maze until it becomes trapped. The snake The snake commences its journey from a specified starting point, oriented towards the EAST. Its movement follows a specific rule: it maintains a wall or a segment of its body directly to the LEFT of its head (...
evolcodegolf
In a variant of the classic puzzle game, you are presented with a hexagonal grid where each cell can either contain a hidden treasure or be empty. Your objective is to identify the locations of all treasures based on the clues given by adjacent cells. Each cell that reveals a number indicates how many treasures are loc...
evolcodegolf
Transform a numerical value, such as 4591827364.987, into a formatted version that includes commas for thousands: 4,591,827,364.987. Bonus points for avoiding any loops. Bonus points for refraining from using string manipulation functions.
evolcodegolf
Task For a given base \(n \ge 3\), identify the smallest positive integer \(m\) such that, when expressed in base \(n\) and subjected to a single right rotation, the result equals \(2m\). Ensure that the base-\(n\) representation of \(m\) does not contain leading zeroes. Additionally, investigate the properties of th...
evolcodegolf
Exploring Prime Palindromes Mathematics has its beauty in the relationships between numbers, and prime palindromes are a captivating subset of integers that are both prime and palindromic. Your task is to delve into this fascinating intersection of properties. We want to filter through a set of integers to identify w...
evolcodegolf
Task Given a UTF-8 encoded string (provided through any means), generate a corresponding list where each entry represents the number of bytes required to encode the respective input character, including considerations for multibyte characters and any special encoding scenarios. Examples @ → 1 Bonjour → 1 1 1 1 ...
evolcodegolf
See also: Wordagons Challenge Given a regular hexagonal arrangement of ASCII characters and an integer n as input, output the identical hexagonal structure rotated n times according to the specified angle of rotation. Hexagon The hexagon will be represented as a string formatted as follows: a b c d d e e...
evolcodegolf
The characteristic polynomial associated with a square matrix \$A\$ can be articulated as the polynomial \$p_A(x) = \det(Ix - A)\$, wherein \$I\$ signifies the identity matrix and \$\det\$ denotes the determinant function. It is important to note that this formulation invariably yields a monic polynomial, thereby ensur...
evolcodegolf
First, a few definitions: Given n and k, consider the sorted list of multisets, where for each multiset we choose k numbers from {0, 1, ..., n-1} with repetitions. For example, for n=5 and k=3, we have: [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 0, 3), (0, 0, 4), (0, 1, 1), (0, 1, 2), (0, 1, 3), (0, 1, 4), (0, 2, 2), (0,...
evolcodegolf